But when subsetting, the original untransformed, loca table is used to get the glyf table offset leading to extraneous or empty glyph data
To support such case it is needed to encode the transformed glyf data into a buffer and than use it when subsetting. Just transforming loca table won't work, and is superfluous, because the transformed glyf data is stored as an array objects and not as a buffer
This bug does not affects woff2 otf (with CFF outlines) files
Woff2 fonts can have loca and glyf stored in a specific format which is supposed to be transformed at decode time.
Currently, fontkit transforms the glyf table which is sufficient to read glyph data
But when subsetting, the original untransformed, loca table is used to get the glyf table offset leading to extraneous or empty glyph data
To support such case it is needed to encode the transformed glyf data into a buffer and than use it when subsetting. Just transforming loca table won't work, and is superfluous, because the transformed glyf data is stored as an array objects and not as a buffer
This bug does not affects woff2 otf (with CFF outlines) files