Merged in bugfix/PMCORE-2179 (pull request #7479)

PMCORE-2179

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Julio Cesar Laura Avendaño
2020-09-16 15:29:34 +00:00
2 changed files with 9 additions and 1 deletions

View File

@@ -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

View File

@@ -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']}";
}
}