Closed seloumi closed 4 years ago
Well Script=Arabic is the wrong script to write something in Latin. Beside this I don't think that there is anything fontspec can do here, it is probably a font problem.
@u-fischer my document is in Arabic and I'm facing the issue when writing some Latin words
@khaledhosny may be you have an idea ?
That is looks odd but expected, don’t use Script=Arabic
for non-Arabic text, it will cause HarfBuzz to do layout from right to left, so it sees if
as fi
and makes it a ligature.
Nothing here is specific to Amiri, you might not get it with most other fonts because Latin ligature lookups won’t be registered for Arabic script, but Amiri does (not purposefully, but because it simplifies font source).
@khaledhosny Thanks, so nothing to do here? just change to Script=Latin
feature for every Latin words containing if
?
Of course, script should be detected automatically, but TeX lives in the previous century and no one gives a damn.
Well luaotfload has a multiscript=auto
option:
\documentclass{article}
\usepackage{fontspec}
\begin{document}
\setmainfont[Renderer=HarfBuzz]{Amiri}
Scientifique یہ ایک جملہ ہے
\setmainfont[Renderer=HarfBuzz,Script=Arabic]{Amiri}
Scientifique یہ ایک جملہ ہے
\setmainfont[Renderer=HarfBuzz,RawFeature={multiscript=auto}]{Amiri}
Scientifique یہ ایک جملہ ہے
\end{document}
And with babel
–luatex
: https://github.com/latex3/babel/wiki/What's-new-in-babel-3.38 .
Description
With
Amiri
font andScript=Arabic
feature I obtain an incorrect result with words like "Scientifique" It appears like this "Scientfiique"Check/indicate
Minimal example demonstrating the issue
Result