Fonttools: Add font slicer

Created on 10 Sep 2018  路  5Comments  路  Source: fonttools/fonttools

I think @twardoch requested this before. Google Fonts can probably use it too. We want functionality that analyzes GSUB/GPOS, and return sets of characters that all need to be in the same slice of the font. This is useful for slicing fonts for CSS serving optimization tricks.

Most helpful comment

FWIW here's a unionfind implementation I made quickly back in 2015 when @twardoch requested this feature from me privately: https://gist.github.com/behdad/0d36c27b6a664726a5b9c6050fc27d42

All 5 comments

cc @garretrieger

Let's resurrect this and implement in HarfBuzz and possible fonttools.

FWIW here's a unionfind implementation I made quickly back in 2015 when @twardoch requested this feature from me privately: https://gist.github.com/behdad/0d36c27b6a664726a5b9c6050fc27d42

I want to note that if we have a mark glyph, then it will bundle up all bases that define an attachment for that mark. Just making sure we all on the same page about that.

Related to this we probably also want to consider codepoints that can participate in unicode compositions and decompositions as noted in this harfbuzz issue: https://github.com/harfbuzz/harfbuzz/issues/2283

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ivanov-v picture ivanov-v  路  11Comments

typefacts picture typefacts  路  4Comments

cjdunn picture cjdunn  路  11Comments

RomulBY picture RomulBY  路  4Comments

arrowtype picture arrowtype  路  8Comments