I used to use this macro for hebrew font:

\newcommand{\hebrew}[1]{{{\textdir TRT\hebfont #1}}}

some time ago I had to change this to

  % Weird Bug with styled hebrew: The letter get replaced by their successor in the alphabet,
  %   e.g. aleph to bet, bet to gimmel
\newcommand{\hebrew}[1]{{{\textdir TRT\hebfont #1}}}

because characters get replaced by its successors (aleph to bet, bet to gimmel, …). This fix worked for a while, because this bug only occurred in formatted text, but now it is in normal font too. When I select and copy the text, I get the correct text though. I have no idea how I can debug this.

\newcommand{\hebrew}[1]{{{\textdir TRT\hebfont #1}}}

  \hebrew{כל המקיים נפש אחת, כאילו קיים עולם מלא.‎}

produces: this

  • Your code produces the expected output for me. Is your distribution up-to-date?
    – campa
    Dec 7, 2020 at 19:37
  • This is LuaHBTeX, Version 1.12.0
    – sivizius
    Dec 7, 2020 at 19:49
  • I tried fontsquirrel.com/fonts/dejavu-sans directly with the same result. maybe an ttf-issue?
    – sivizius
    Dec 7, 2020 at 19:56
  • @sivizius I get the correct output too. Maybe you have an odd version of the font installed? In one of the last lines of LuaLaTeX's terminal output, you should see the path of the used font file. Could you post that? (I probably looks like like </some/path/to/texmf-dist/fonts/truetype/public/dejavu/DejaVuSans.otf>) Dec 7, 2020 at 20:24
  • see my last comment: I used the font from fontsquirrel.com/fonts/dejavu-sans too with the same result, so in my test-case: <./foobar.ttf> (foobar.ttf=DejaVuSans.ttf from there)
    – sivizius
    Dec 7, 2020 at 20:46


You must log in to answer this question.

Browse other questions tagged .