From: David Thompson Date: Fri, 14 Nov 2014 15:48:26 +0000 (-0500) Subject: PDF LaTeX hacks. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3d70fb207cf3c9a269a3f43d46ba17edf3dcff7e;p=civicrm-core.git PDF LaTeX hacks. --- diff --git a/CRM/Utils/PDF/Utils.php b/CRM/Utils/PDF/Utils.php index 8b51f8341f..13feb774d1 100644 --- a/CRM/Utils/PDF/Utils.php +++ b/CRM/Utils/PDF/Utils.php @@ -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} } } } -