PMCORE-2179
This commit is contained in:
@@ -1345,7 +1345,7 @@ class OutputDocument extends BaseOutputDocument
|
|||||||
public static function generateCssFile()
|
public static function generateCssFile()
|
||||||
{
|
{
|
||||||
// Initialize variables
|
// 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 = '';
|
$css = '';
|
||||||
|
|
||||||
// Load the custom fonts list
|
// Load the custom fonts list
|
||||||
|
|||||||
@@ -163,7 +163,15 @@ class Designer extends Controller
|
|||||||
OutputDocument::checkTcPdfFontsPath();
|
OutputDocument::checkTcPdfFontsPath();
|
||||||
foreach (OutputDocument::loadTcPdfFontsList() as $font) {
|
foreach (OutputDocument::loadTcPdfFontsList() as $font) {
|
||||||
if ($font['inTinyMce']) {
|
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'];
|
$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']}";
|
$tcPdfFonts[$font['friendlyName']] = "{$font['friendlyName']}={$font['familyName']}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user