dompdf / php-font-lib

A library to read, parse, export and make subsets of different types of font files.
GNU Lesser General Public License v2.1
1.73k stars 256 forks source link

Noto Sans SC, missing glyphs, glyphs too wide #84

Closed NathanSweet closed 3 years ago

NathanSweet commented 3 years ago

Using this Noto Sans SC OTF font with the PHP library dompdf, I see some missing glyphs. Eg, "订单" is rendered as: The expected rendering is: I'm afraid I can't tell if the problem is php-font-lib, dompdf, or the PDF viewer.

I also see very wide spacing for numbers and Latin glyphs: Maybe this is a problem with the metrics from php-font-lib? It makes the font unusable, as the text may be Chinese or Latin and spacing like this makes the Latin much too wide.

NathanSweet commented 3 years ago

After further research it seems there were a lot more problems than just the above and the cause is that OTF is not supported. Using TTF solved all the problems.