swash icon indicating copy to clipboard operation
swash copied to clipboard

CharMap does not include substitutions

Open tim-harding opened this issue 2 years ago • 0 comments

I would like to be able to cache glyphs in a font atlas at startup. The issue that I am running into is that ligature glyph IDs and other substitutions are not included in the charmap, so those characters would need to cached lazily during shaping because I cannot enumerate them upfront. Is there an easy way to enumerate the contents of the GLYF and CFF tables instead? It seems that the parsers for them are well-established but only set up to access entries by glyph ID on demand.

As a side note, navigating this codebase over the last few hours to see if I could do it myself has given me a new appreciation for how complex font handling is 🙃. Hats off to you.

tim-harding avatar Aug 06 '23 05:08 tim-harding