RazrFalcon / ttf-parser

A high-level, safe, zero-allocation TrueType font parser.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Replacement for `FaceTables::from_table_provider`

rramphal opened this issue · comments

Last year, I was using v0.12.3 which provided the FaceTables::from_table_provider function. When I tried to upgrade to the latest v0.15.0, I found that function was no longer there. Has it been completely removed, or has it been moved/renamed? Would someone be able to suggest an alternative approach?

Thank you!

You should use RawFaceTables now.

Thank you for pointing me in the right direction!

This might be an ignorant question, but currently I'm using font-kit to get a list of font handles, load them, and extract their head, hhea, maxp, and cmap tables. Once I have those, I am creating a Face from RawFaceTables, and then I call face.tables().cmap to get to the subtables. Once I have the subtables, I iterate over them to get codepoints. Is there a quicker way to get the codepoints? Once I have the cmap table from font-kit, can I get the codepoints directly without going through a Face; or are the other head, hhea, and maxp tables necessary to correctly parse a cmap table?

Of course — thank you for your help!