Technical discuss

Dompdf add Chinese font support

  • btt
  • [btt]
  • Topic Author
  • Offline
  • Administrator
  • Administrator
More
09 Dec 2024 19:33 #209 by btt
New Topic
1.Put font DroidSansFallback.ttf file in Folder libraries/fabrik/vendor/dompdf/dompdf/lib/fonts,
2.Add the code in dompdf_font_family_cache.php which locates in folder libraries/fabrik/vendor/dompdf/dompdf/lib/fonts:

'droidsans' => array(
'normal' => $fontDir . '/DroidSansFallback',
'bold' => $fontDir . '/DroidSansFallback',
'italic' => $fontDir . '/DroidSansFallback',
'bold_italic' => $fontDir . '/DroidSansFallback',
),
3. Add the code in custom_css.php in fabrikar details view tempate:
* {font-size:8.0pt;line-height:120%;font-family:FontAwesome,'DroidSans'!important}

Please Log in or Create an account to join the conversation.