You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Aiming to embed a custom font into the final pdf, working well in 6.0 but something wrong when referencing the 7.0 document to migrate the implementation.
Using: php 7.2.0, CodeIgniter 3.1.6, mpdf 7.0, HTML page main language: zh-CN, zh-HK, zh-TW
Here is what happens:
I was about to render an HTML page which was no lang tag, css font-family is "SF Pro SC" which is widely known as Apple's system default font. In CJK world, the "SF Pro SC" must fall back to "PingFang SC" to support zh language so I have to set default fonts and do some work to support:
I choose the customise word "sfprosc" to link the font file and set it to be the default font, then I set 'mode' => '+aCJK', 'watermark_font' => 'sfprosc', and both autoLangToFont and autoScriptToLang are TRUE,
Something weird is after I added 'fontdata' config variable, the page is freezing and nothing to display after running this function. Also something I have to change a little bit is the implementation of CustomLanguageToFontImplementation(), I cannot extends the interface like the documents suggested:
class CustomLanguageToFontImplementation implements \Mpdf\Language\LanguageToFontInterface
{
Aiming to embed a custom font into the final pdf, working well in 6.0 but something wrong when referencing the 7.0 document to migrate the implementation.
Using: php 7.2.0, CodeIgniter 3.1.6, mpdf 7.0, HTML page main language: zh-CN, zh-HK, zh-TW
Here is what happens:
I was about to render an HTML page which was no lang tag, css font-family is "SF Pro SC" which is widely known as Apple's system default font. In CJK world, the "SF Pro SC" must fall back to "PingFang SC" to support zh language so I have to set default fonts and do some work to support:
I choose the customise word "sfprosc" to link the font file and set it to be the default font, then I set 'mode' => '+aCJK', 'watermark_font' => 'sfprosc', and both autoLangToFont and autoScriptToLang are TRUE,
Something weird is after I added 'fontdata' config variable, the page is freezing and nothing to display after running this function. Also something I have to change a little bit is the implementation of CustomLanguageToFontImplementation(), I cannot extends the interface like the documents suggested:
class CustomLanguageToFontImplementation implements \Mpdf\Language\LanguageToFontInterface
{
}
In mpdf6.0, I only force the $unifont = 'sfprosc' in the config_lang2fonts.php before
return array($coreSuitable, $unifont);
and that's working fine.The text was updated successfully, but these errors were encountered: