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>
Tue, 27 Sep 2022 21:05:22 +0000 (17:05 -0400)
CRM/Utils/PDF/Utils.php

index 9353ea2ba397b9f6f7e45912fdcea8261973778b..c70f60223faa12095ec13df3645fdaa112eca3ea 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}