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

Handle fonts with Unicode full repertoire (U+10000 to U+10FFFF) #140

Open romaincazier opened 3 months ago

romaincazier commented 3 months ago

When using the library to output fonts’ character set, I noticed some were missing characters (when compared with opentypejs’ output) because of glyphs being part of the Unicode full repertoire (U+10000 to U+10FFFF).

This commit updates getUnicodeCharMap() to check the cmap subtables in reverse so the Unicode full repertoire Encoding ID comes first.