[HarfBuzz] get glyph from feature only
Werner LEMBERG
wl at gnu.org
Thu Dec 10 09:15:55 PST 2015
> What's your actual use case here?
ttfautohint, trying to handle glyphs that are not directly accessible
with the cmap.
For example, let's assume superscript glyphs, to be accessed with the
`sups' feature. I have to derive both blue zones and default stem
widths from superscript glyphs, and this *must* fail if there aren't
superscript glyphs available.
> And what do you mean by "gets handled by a feature"? It sounds like
> you mean "the output is different than it would have been without
> the feature".
Exactly.
> What if the result has the exact same glyph indices and positions,
> but different cluster values?
This doesn't matter for my purposes. ttfautohint is about hinting
only, not related to shaping.
> What if the result could have been affected by the feature in
> question, but a different feature is masking it -- do you want to
> consider it "handled" or "not handled"?
The set of features I'm interested in is very limited: `c2cp', `c2sc',
`ordn', `pcap', `ruby', `sinf', `smcp', `subs', `sups', and `titl'.
> What if the feature may or may not affect the given character,
> depending on context far beyond the cluster itself?
I think this is rather unlikely for the features I have to handle.
> You might want to try collecting the relevant lookups for the
> feature (see hb_ot_layout_collect_lookups) and then the set of
> glyphs referenced by those lookups
> (hb_ot_layout_lookup_collect_glyphs)...
I'm already using this for something different (Behdad has implemented
that for me :-), but ...
> but that doesn't tell you whether the lookups will in fact modify
> the result, as there could be lookups that match the relevant glyphs
> but actually leave the output unchanged.
... it doesn't help me here, yes.
Werner
More information about the HarfBuzz
mailing list