[subset] in SingleSubst subsetting, check for substitute in glyphset
That matches what fonttools does and allows for specifying exact glyphset for subset.
This commit is contained in:
parent
499029644f
commit
38f95baf6b
|
@ -111,8 +111,11 @@ struct SingleSubstFormat1
|
||||||
+ hb_iter (this+coverage)
|
+ hb_iter (this+coverage)
|
||||||
| hb_filter (glyphset)
|
| hb_filter (glyphset)
|
||||||
| hb_map_retains_sorting ([&] (hb_codepoint_t g) {
|
| hb_map_retains_sorting ([&] (hb_codepoint_t g) {
|
||||||
return hb_codepoint_pair_t (glyph_map[g],
|
return hb_codepoint_pair_t (g,
|
||||||
glyph_map[(g + delta) & 0xFFFF]); })
|
(g + delta) & 0xFFFF); })
|
||||||
|
| hb_filter (glyphset, hb_second)
|
||||||
|
| hb_map_retains_sorting ([&] (hb_codepoint_pair_t p) -> hb_codepoint_pair_t
|
||||||
|
{ return hb_pair (glyph_map[p.first], glyph_map[p.second]); })
|
||||||
;
|
;
|
||||||
|
|
||||||
bool ret = bool (it);
|
bool ret = bool (it);
|
||||||
|
@ -208,6 +211,7 @@ struct SingleSubstFormat2
|
||||||
auto it =
|
auto it =
|
||||||
+ hb_zip (this+coverage, substitute)
|
+ hb_zip (this+coverage, substitute)
|
||||||
| hb_filter (glyphset, hb_first)
|
| hb_filter (glyphset, hb_first)
|
||||||
|
| hb_filter (glyphset, hb_second)
|
||||||
| hb_map_retains_sorting ([&] (hb_pair_t<hb_codepoint_t, const GlyphID &> p) -> hb_codepoint_pair_t
|
| hb_map_retains_sorting ([&] (hb_pair_t<hb_codepoint_t, const GlyphID &> p) -> hb_codepoint_pair_t
|
||||||
{ return hb_pair (glyph_map[p.first], glyph_map[p.second]); })
|
{ return hb_pair (glyph_map[p.first], glyph_map[p.second]); })
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue