PMCORE-2128

This commit is contained in:
Julio Cesar Laura Avendaño
2020-09-12 00:08:05 +00:00
parent 93086ecd0d
commit 45de45bee6
149 changed files with 702 additions and 8 deletions

View File

@@ -146,14 +146,26 @@ class Designer extends Controller
// Merge default fonts with fonts registered by TCPDF library
$tcPdfFonts = [
'Cormorant Garamond' => 'Cormorant Garamond=cormorantgaramond',
'Courier New' => 'Courier New=courier new,courier',
'Gentium Book Basic' => 'Gentium Book Basic=gentiumbookbasic',
'Grandstander' => 'Grandstander=grandstander',
'Helvetica' => 'Helvetica=helvetica',
'Inconsolata' => 'Inconsolata=inconsolata',
'Josefin Sans' => 'Josefin Sans=josefinsans',
'Lato' => 'Lato=lato',
'Montserrat' => 'Montserrat=montserrat',
'Noto Serif' => 'Noto Serif=notoserif',
'Open Sans' => 'Open Sans=opensans',
'Quicksand' => 'Quicksand=quicksand',
'Times New Roman' => 'Times New Roman=times new roman,times'
];
OutputDocument::checkTcPdfFontsPath();
foreach (OutputDocument::loadTcPdfFontsList() as $font) {
$font['friendlyName'] = !empty($font['friendlyName']) ? $font['friendlyName'] : $font['familyName'];
$tcPdfFonts[$font['friendlyName']] = "{$font['friendlyName']}={$font['familyName']}";
if ($font['inTinyMce']) {
$font['friendlyName'] = !empty($font['friendlyName']) ? $font['friendlyName'] : $font['familyName'];
$tcPdfFonts[$font['friendlyName']] = "{$font['friendlyName']}={$font['familyName']}";
}
}
ksort($tcPdfFonts, SORT_NATURAL | SORT_FLAG_CASE);
$this->setVar('tcPdfFonts', implode(';', $tcPdfFonts));