Improved arabic and hebrew scripts
authorRuben Rodriguez <ruben@gnu.org>
Tue, 8 Jun 2021 21:35:34 +0000 (23:35 +0200)
committerMichael McMahon <michael@fsf.org>
Wed, 4 May 2022 20:33:00 +0000 (16:33 -0400)
CRM/Utils/PDF/Utils.php

index 381485e244c56339a670a5d4adaa2eaa28e98fa2..ff77869a3b85b5a72345f6850b56d5f7a1cd5df8 100644 (file)
@@ -50,14 +50,16 @@ class CRM_Utils_PDF_Utils {
 \usepackage{fontspec,xunicode}
 %% VERY IMPORTANT.  Configures supported languages and fonts to use for each one.
 \usepackage[Latin, Hebrew, Arabics, CJK, Diacritics]{ucharclasses}
+\newfontfamily\arabfont{FreeSerif}[Script = Arabic]
+\newfontfamily\hebrewfont{FreeSerif}[Script = Hebrew]
 \newfontfamily{\normalfont}[Ligatures=TeX]{FreeSerif}
 \newfontfamily{\cjkfont}{WenQuanYi Zen Hei}
 \setDefaultTransitions{\normalfont}{}
 \setTransitionsForLatin{\normalfont}{}
-\setTransitionsForArabics{\normalfont}{}
+\setTransitionsForArabics{\arabfont}{}
 \setTransitionsForCJK{\cjkfont}{}
 \setTransitionsForDiacritics{\normalfont}{}
-\setTransitionTo{Hebrew}{\normalfont}
+\setTransitionTo{Hebrew}{\hebrewfont}
 \setmainfont{FreeSerif}
 
 \newcommand{\fsfclosing}[1]{\par\nobreak\vspace{\parskip}