-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
tl;dr Can we use ICU or HarfBuzz to extract shaping and kerning tables from a font?
From discussion with @nickidlugash on adding kerning support:
FreeType only supports kerning via the (rather simple) ‘kern’ table. For the interpretation of kerning data in the (highly sophisticated) ‘GPOS’ table you need a higher-level library like ICU or HarfBuzz since it can be context dependent (this is, the kerning may vary depending on the position within a text string, for example).
http://freetype.org/freetype2/docs/glyphs/glyphs-4.html
- FreeType has limited support for reading kerning tables and running
FT_Get_Kerningfor all possible glyph pairs seems like a terrible idea. - We'll need to integrate HarfBuzz (and a JavaScript equivalent?) into our rendering engines at some point for complex text shaping, could we handle kerning at this point too?
- Is it possible to use ICU or HarfBuzz to extract shaping and kerning tables from a font at upload time to be stashed on S3 and used later for rendering, rather than having to load the full font file into HarfBuzz/ICU?