From d28132a1be9a872b6bfc73a5a284889bea37f87d Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Wed, 28 Aug 2013 14:06:02 -0700 Subject: [PATCH] CRM-13307 ---------------------------------------- * CRM-13307: allow for additional fonts to be used when making mailing labels http://issues.civicrm.org/jira/browse/CRM-13307 --- CRM/Utils/PDF/Label.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CRM/Utils/PDF/Label.php b/CRM/Utils/PDF/Label.php index 3bf9d5fd3b..ed79dd37d2 100644 --- a/CRM/Utils/PDF/Label.php +++ b/CRM/Utils/PDF/Label.php @@ -246,12 +246,23 @@ class CRM_Utils_PDF_Label extends TCPDF { 'times' => ts('Times New Roman'), 'dejavusans' => ts('Deja Vu Sans (UTF-8)'), ); + + + // Check to see if we have any additional fonts to add. You can specify more fonts in + // civicrm.settings.php via: $config['CiviCRM Preferences']['additional_fonts'] + // CRM-13307 + $additionalFonts = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'additional_fonts'); + if (is_array($additionalFonts)) { + $fontLabel = array_merge($fontLabel, $additionalFonts); + } + $tcpdfFonts = $this->fontlist; foreach ($tcpdfFonts as $fontName) { if (array_key_exists($fontName, $fontLabel)) { $list[$fontName] = $fontLabel[$fontName]; } } + return $list; } } -- 2.25.1