Harfbuzz subsetting Unicode and glyph sets #4745
-
I have a question about how HB_SUBSET_SETS_GLYPH_INDEX and HB_SUBSET_SETS_UNICODE sets interact in subsetting. I have a list of Unicode points I wish to remove, and I have an unrelated list of glyph IDs I also wish to remove. I have called hb_subset_input_keep_everything() so both Unicode and glyphs sets are full. My understanding is that in order to remove a glyph/character it can’t appear in either Unicode or glyph sets. For example, if I remove the Unicode for ‘A’ from the Unicode set but don’t remove its corresponding glyph ID it will stay in the font. If I only have a list of Unicode points to remove, then I can remove those from the Unicode set and then clear the glyph set so corresponding glyphs will be removed. In my example where I have unrelated Unicode and glyphs IDs to exclude, should I similarly clear the Unicode set and then lookup the nominal glyph IDs for all the Unicode points to remove from the glyph set, remove them, and then remove my list of glyph IDs from the glyph set? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That sounds like the easiest way, yes. You might need the opposite as well. |
Beta Was this translation helpful? Give feedback.
That sounds like the easiest way, yes. You might need the opposite as well.