PDF LaTeX hacks.
authorDavid Thompson <davet@gnu.org>
Fri, 14 Nov 2014 15:48:26 +0000 (10:48 -0500)
committerDavid Thompson <davet@gnu.org>
Fri, 14 Nov 2014 15:48:26 +0000 (10:48 -0500)
CRM/Utils/PDF/Utils.php

index 8b51f8341f97900cb30c23f63545efbba9935d3d..13feb774d1acc99945df623be46ed0d749ac7bb3 100644 (file)
@@ -52,6 +52,16 @@ class CRM_Utils_PDF_Utils {
 \usepackage{graphicx}
 \usepackage[T1]{fontenc}
 \usepackage{fullpage}
+\usepackage{fontspec,xunicode}
+%% VERY IMPORTANT.  Configures supported languages and fonts to use for each one.
+\usepackage[Latin, Hebrew, Arabics, CJK, Diacritics]{ucharclasses}
+\setDefaultTransitions{\fontspec{CMU Serif}}{}
+\setTransitionsForLatin{\fontspec{CMU Serif}}{}
+\setTransitionsForArabics{\fontspec{Droid Sans Arabic}}{}
+\setTransitionsForCJK{\fontspec{WenQuanYi Zen Hei}}{}
+\setTransitionsForDiacritics{\fontspec{Droid Sans Arabic}}{}
+\setTransitionTo{Hebrew}{\fontspec{David CLM}}
+\setmainfont{CMU Serif}
 
 \newcommand{\fsfclosing}[1]{\par\nobreak\vspace{\parskip}
   \stopbreaks
@@ -60,7 +70,7 @@ class CRM_Utils_PDF_Utils {
   \hspace*{\longindentation}\fi
   \parbox{\indentedwidth}{\raggedright
        \ignorespaces #1\\\\[1\medskipamount]
-       \hspace*{-0.25in}\includegraphics[scale=1.0]{sigjohns.pdf}
+       \hspace*{-0.25in}\includegraphics[scale=1.0]{/var/www/drupal-7.27/sites/all/modules/civicrm/sigjohns.pdf}
        \\\\
 
        \ifx\@empty\fromsig
@@ -402,4 +412,3 @@ right  = 1.0in]{geometry}
     }
   }
 }
-