PMCORE-2098

This commit is contained in:
Julio Cesar Laura Avendaño
2020-09-01 16:24:45 +00:00
parent 85797df0bc
commit 628dc1f67f
3 changed files with 83 additions and 1 deletions

View File

@@ -1285,6 +1285,26 @@ class OutputDocument extends BaseOutputDocument
self::generateCssFile();
}
/**
* Remove a custom font used in TCPDF library
*
* @param string $fileName
*/
public static function removeTcPdfFont($fileName)
{
// Load the custom fonts list
$fonts = self::loadTcPdfFontsList();
// Add the font
unset($fonts[$fileName]);
// Save the fonts list
self::saveTcPdfFontsList($fonts);
// Re-generate CSS file
self::generateCssFile();
}
/**
* Generate CSS with the fonts definition to be used by TinyMCE editor
*/