diff --git a/pitfall/fontkit/subset.rkt b/pitfall/fontkit/subset.rkt index 56540788..cc9ac830 100644 --- a/pitfall/fontkit/subset.rkt +++ b/pitfall/fontkit/subset.rkt @@ -57,6 +57,11 @@ https://github.com/mbutterick/fontkit/blob/master/src/subset/TTFSubset.js (index? . ->m . index?) (define glyph (send (ยท this font) getGlyph gid)) + ;; _decode unpacks the `glyf` table data corresponding to a certin gid. + ;; here, it's not necessary for non-composite glyphs + ;; because they just get copied entirely into the subset. + ;; it's just used to detect composite glyphs and handle them specially. + ;; so an optimization would be to detect composite / noncomposite without full _decode. (define glyf (send glyph _decode)) ;; get the offset to the glyph from the loca table