Fix glyph closure for alternate substitution.

It was not filtering on the glyphs to be retained.
This commit is contained in:
Garret Rieger 2020-02-20 13:43:06 -08:00 committed by Ebrahim Byagowi
parent da37880e17
commit 411225426f
13 changed files with 15 additions and 0 deletions

View File

@ -605,6 +605,7 @@ struct AlternateSubstFormat1
void closure (hb_closure_context_t *c) const
{
+ hb_zip (this+coverage, alternateSet)
| hb_filter(c->glyphs, hb_first)
| hb_map (hb_second)
| hb_map (hb_add (this))
| hb_apply ([c] (const AlternateSet &_) { _.closure (c); })

View File

@ -18,6 +18,7 @@ EXTRA_DIST += \
expected/layout.gpos3 \
expected/layout.gpos4 \
expected/layout.gpos6 \
expected/layout.gsub3 \
expected/layout.gsub6 \
expected/cmap \
expected/cmap14 \

View File

@ -10,6 +10,7 @@ TESTS = \
tests/layout.gpos3.tests \
tests/layout.gpos4.tests \
tests/layout.gpos6.tests \
tests/layout.gsub3.tests \
tests/layout.gsub6.tests \
tests/cmap.tests \
tests/cmap14.tests \

Binary file not shown.

View File

@ -0,0 +1,12 @@
FONTS:
gsub_alternate_substitution.otf
PROFILES:
keep-layout.txt
keep-layout-retain-gids.txt
SUBSETS:
厩叱
*