Closed Udi-Fogiel closed 9 months ago
Should be fixed. \resetfontlatin
is needed particularly when switching between different scripts. What was missing here, in the case of inline switch, is a following setback of the language's potential extra settings.
Still does not work if the other language is non-Latin:
% !TeX TS-program = xelatex
\documentclass{article}
\usepackage{xcolor}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{hebrew}
\newfontfamily\hebrewfont{David CLM}[Color=red, Script=Hebrew]
% \def\resetfontlatin{}
\begin{document}
\selectlanguage{hebrew}
Test \textenglish{Test} Test
\section{Test}
\end{document}
\resetfontlatin
is needed particularly when switching between different scripts.
Isn't switching the fonts should be enough? or just adding the correct Script with \addfontfeature
?
Still does not work if the other language is non-Latin:
Thanks, should be fixed now as well.
Isn't switching the fonts should be enough? or just adding the correct Script with
\addfontfeature
?
No. I can't go into details now, but it is needed in many cases IIRC.
Thanks, should be fixed now as well.
At e8734536a0dbefdb for that matter
Thanks, should be fixed now as well.
Thanks For the quick fix.
Isn't switching the fonts should be enough? or just adding the correct Script with
\addfontfeature
?No. I can't go into details now, but it is needed in many cases IIRC.
Ok, I'll try to investigate a little more, but maybe I shouldn't fix something that isn't broken...
maybe I shouldn't fix something that isn't broken...
That would be my advise as well. The whole language/script switching business is really sensitive area.
@jspitz Is there any chance to load the new version to ctan soon? I encountered several users who had confusing error messages about missing glyphs in their fonts, because they wrote in hebrew and the font was Latin Modern as a consequence of this bug.
I don't want to tell to many people to add a temporary patch to their documents, but this is not really urgent, so don't feel obliged if you don't currently have the time.
I'm quite busy with RL currently, but I see if I can prepare a release in due time.
I have just submitted polyglossia
1.65 to CTAN.
I don't really understand the purpose of
\resetfontlatin
, but it tampers with\normalfont
. For example, see how the section head in the following code has the wrong font:If I uncomment the line
\def\resetfontlatin{}
everything looks ok... Is there a need for this\resetfontlatin
?