get the characters available in TrueType with PHP

后端 未结 2 832
滥情空心
滥情空心 2021-01-18 18:36

How do I get a list of all characters available in the TrueType font? using PHP.

相关标签:
2条回答
  • 2021-01-18 18:58

    If I look at your older post, it seems you're stuck in the format 4 subtable extraction. After having extracted the rangeShift value, endCode must be extracted for each segCount value, then reservedPad on its own, then startCode, idDelta, and idRangeOffset must also be extracted for each segCount.

    Then it gets harder. You have extracted all the data available, and now have to rebuild the information. For this, you should take a look at this to get a glimpse of what you have to do. With this, you should have all the information needed to finish your code.

    0 讨论(0)
  • 2021-01-18 19:04

    PHP does not seem to have any extension that works directly with FreeType, the reigning open source library to deal with TrueType fonts.

    You may have to shell out to another language with an appropriate library, like Perl's Font::FreeType::Glyph, which will let you ask each font whether it has a representation of a particular glyph.

    In the alternative, you could write the proper PHP extension directly in C.

    0 讨论(0)
提交回复
热议问题