diff --git a/workflow/engine/classes/model/OutputDocument.php b/workflow/engine/classes/model/OutputDocument.php index 240a7a119..a55b1098e 100644 --- a/workflow/engine/classes/model/OutputDocument.php +++ b/workflow/engine/classes/model/OutputDocument.php @@ -1345,7 +1345,7 @@ class OutputDocument extends BaseOutputDocument public static function generateCssFile() { // Initialize variables - $template = "@font-face {font-family: @familyName;src: url(/fonts/font.php?file=@fileName) format('truetype');@properties}\n"; + $template = "@font-face {font-family: @familyName;src: url('/fonts/font.php?file=@fileName') format('truetype');@properties}\n"; $css = ''; // Load the custom fonts list diff --git a/workflow/engine/controllers/designer.php b/workflow/engine/controllers/designer.php index e065b45f3..54b93ac58 100644 --- a/workflow/engine/controllers/designer.php +++ b/workflow/engine/controllers/designer.php @@ -163,7 +163,15 @@ class Designer extends Controller OutputDocument::checkTcPdfFontsPath(); foreach (OutputDocument::loadTcPdfFontsList() as $font) { if ($font['inTinyMce']) { + // If these value are different, create a complex font family string + if ($font['familyName'] != $font['tcPdfFileName']) { + $font['familyName'] = "{$font['familyName']},{$font['tcPdfFileName']}"; + } + + // Build friendly name $font['friendlyName'] = !empty($font['friendlyName']) ? $font['friendlyName'] : $font['familyName']; + + // Set the value to use in the html editor $tcPdfFonts[$font['friendlyName']] = "{$font['friendlyName']}={$font['familyName']}"; } }