I am using XeLaTeX + polyglossia for Hebrew typesetting. Recently I have encountered an issue with producing dashes (Kav Mafrid, in Hebrew) in Hebrew texts. The issue arises when I am using newfontfamily
instead of setmainfont
.
To be more precise, here is an example. When I am using setmainfont
, the following code
\documentclass{article}
\usepackage{fontspec}
\setmainfont{David CLM}
\setsansfont{Simple CLM}
\setmonofont{Miriam Mono CLM}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\begin{document}
קו -- מפריד.
\end{document}
produces the right output:
However, the compilation in that case is very slow (I have no idea why, but it runs xelatex
6 times), and I have issues including Latin characters with accents inside Hebrew paragraphs (see this question).
The better practice is, perhaps, to use newfontfamily
. In that case, this is the code:
\documentclass{article}
\usepackage{fontspec}
\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
\newfontfamily\hebrewfonttt[Script=Hebrew]{Miriam Mono CLM}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Simple CLM}
\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\begin{document}
קו -- מפריד.
\end{document}
In that case, the compilation is very quick (only a single call to xelatex
), and some issues with Latin characters are solved, but the output is the following:
Any idea what I can do to fix this behaviour?