Yoohoo-Plugins / pmpro-pdf-invoices

PMPro PDF Invoices Plugin
GNU General Public License v2.0
4 stars 3 forks source link

Special Character Support #37

Closed JarrydLong closed 2 years ago

JarrydLong commented 2 years ago

Different characters require different fonts to render.

After testing with the following string in the PDF:

test 简化字 彝語/彝语 test číslo € černý Češký

There are two fonts that work for this combination.

DejaVu Sans: works well for cyrillic characters DroidSansFallbackFull: works well for chinese characters

A new filter has been introduced called pmpro_pdf_dompdf_default_font and accepts 1 parameter: a font name

image DejaVu Sans will break Chinese characters. It doesn't show ?? marks but it doesn't render anything

image DroidSansFallbackFull renders Chinese Characters but cyril characters are shown as blocks.