Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faulty Rendering of accented Hebrew with combining characters in newer TeXLive (2022 and later) #288

Open
jbezos opened this issue Oct 8, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jbezos
Copy link

jbezos commented Oct 8, 2024

From latex3/babel#313, by @LupinoTech. A new MWE without babel is:

\documentclass{article}

\parindent0pt
\usepackage{fontspec}
\setmainfont[Script=Hebrew]{SBL_Hbrw.ttf}

\begin{document}

{\textdir TRT בְּשְׂ}

\end{document}

The following MEW yields different output with TeXlive (2021 or earlier) versus newer TeXlive (2022 and later, including a freshly updated one):

\documentclass[UKenglish]{article}

\usepackage[bidi=basic]{babel}
\babelfont[hebrew]{rm}{SBL_Hbrw.ttf}
\parindent0pt

\begin{document}
Letters without Sheva: \foreignlanguage{hebrew}{בּשׂ}\\
Letters with Sheva: \foreignlanguage{hebrew}{בְּשְׂ}\\
Moar Context: \foreignlanguage{hebrew}{בְּנוֹת יִשְׂרָאֵל}
\end{document}

The used font file SBL_Hbrw.ttf can be found here.

Older TeXLive renders the code as
hebrew_2021
while newer TeXLive renders
hebrew_newest
Note the positions of the "dots" above ש and inside ב.

If it helps, here are the log files for both tex runs:
tl2021.log
newest.log

@zauguin zauguin self-assigned this Nov 17, 2024
@zauguin
Copy link
Member

zauguin commented Nov 17, 2024

The problem here is Unicode normalization which reorders marks in a way the font doesn't expect. The manual of the font (https://www.sbl-site.org/Fonts/SBLHebrewUserManual1.5x.pdf) recommends to disable normalization which can be done with the -normalize font feature:

\documentclass{article}

\parindent0pt
\usepackage{fontspec}
\setmainfont[Script=Hebrew,RawFeature=-normalize]{SBL_Hbrw.ttf}

\begin{document}

{\textdir TRT בְּשְׂ}

\end{document}

As Jonathan mentioned in the related discussion for HarfBuzz a decade ago this is something which should be resolved on the font level, but we can consider doing similar adjustments to the ones done by HarfBuzz.

@zauguin zauguin added the enhancement New feature or request label Nov 17, 2024
@khaledhosny
Copy link
Contributor

A more recent HarfBuzz discussion and change: harfbuzz/harfbuzz#2947

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants