Improved arabic and hebrew scripts
authorRuben Rodriguez <ruben@gnu.org>
Tue, 8 Jun 2021 21:35:34 +0000 (23:35 +0200)
committerRuben Rodriguez <ruben@trisquel.org>
Mon, 5 Jun 2023 20:53:22 +0000 (16:53 -0400)
CRM/Utils/PDF/Utils.php

index d1cdf934480433edcfb0c3ab400f521ef11c2057..ee08bd45ccf3c91a2ec2e77c2f953e83f0b176ec 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}