From 3d70fb207cf3c9a269a3f43d46ba17edf3dcff7e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 14 Nov 2014 10:48:26 -0500 Subject: [PATCH] PDF LaTeX hacks. --- CRM/Utils/PDF/Utils.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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} } } } - -- 2.25.1