diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index aa5d496d1..8a0157575 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -3783,8 +3783,12 @@ struct GSUBGPOS // http://lists.freedesktop.org/archives/harfbuzz/2012-November/002660.html continue; - if (f.featureParams.is_null () - && !f.intersects_lookup_indexes (lookup_indices) + + if (!f.featureParams.is_null () && + tag == HB_TAG ('s', 'i', 'z', 'e')) + continue; + + if (!f.intersects_lookup_indexes (lookup_indices) #ifndef HB_NO_VAR && !alternate_feature_indices.has (i) #endif diff --git a/test/subset/data/Makefile.am b/test/subset/data/Makefile.am index 4934fa66a..d83113bab 100644 --- a/test/subset/data/Makefile.am +++ b/test/subset/data/Makefile.am @@ -40,6 +40,7 @@ EXTRA_DIST += \ expected/layout.tinos \ expected/layout.duplicate_features \ expected/layout.unsorted_featurelist \ + expected/layout.drop_feature \ expected/cmap \ expected/cmap14 \ expected/sbix \ diff --git a/test/subset/data/Makefile.sources b/test/subset/data/Makefile.sources index c9597e0e2..e3bf00c66 100644 --- a/test/subset/data/Makefile.sources +++ b/test/subset/data/Makefile.sources @@ -38,7 +38,8 @@ TESTS = \ tests/layout.tinos.tests \ tests/layout.duplicate_features.tests \ tests/layout.unsorted_featurelist.tests \ - tests/sbix.tests \ + tests/layout.drop_feature.tests \ + tests/sbix.tests \ tests/variable.tests \ tests/glyph_names.tests \ tests/math.tests \ diff --git a/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.default.retain-all-codepoint.ttf b/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.default.retain-all-codepoint.ttf new file mode 100644 index 000000000..750511ad4 Binary files /dev/null and b/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.default.retain-all-codepoint.ttf differ diff --git a/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.glyph-names.retain-all-codepoint.ttf b/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.glyph-names.retain-all-codepoint.ttf new file mode 100644 index 000000000..2af8865fd Binary files /dev/null and b/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.glyph-names.retain-all-codepoint.ttf differ diff --git a/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.notdef-outline.retain-all-codepoint.ttf b/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.notdef-outline.retain-all-codepoint.ttf new file mode 100644 index 000000000..4e24155b3 Binary files /dev/null and b/test/subset/data/expected/layout.drop_feature/SpectralSC-ExtraLightItalic.notdef-outline.retain-all-codepoint.ttf differ diff --git a/test/subset/data/fonts/SpectralSC-ExtraLightItalic.ttf b/test/subset/data/fonts/SpectralSC-ExtraLightItalic.ttf new file mode 100644 index 000000000..e5b0f4798 Binary files /dev/null and b/test/subset/data/fonts/SpectralSC-ExtraLightItalic.ttf differ diff --git a/test/subset/data/tests/layout.drop_feature.tests b/test/subset/data/tests/layout.drop_feature.tests new file mode 100644 index 000000000..9d15ce27b --- /dev/null +++ b/test/subset/data/tests/layout.drop_feature.tests @@ -0,0 +1,10 @@ +FONTS: +SpectralSC-ExtraLightItalic.ttf + +PROFILES: +default.txt +glyph-names.txt +notdef-outline.txt + +SUBSETS: +* diff --git a/test/subset/meson.build b/test/subset/meson.build index a1aa7f12e..dd53551e8 100644 --- a/test/subset/meson.build +++ b/test/subset/meson.build @@ -32,6 +32,7 @@ tests = [ 'layout.tinos', 'layout.duplicate_features', 'layout.unsorted_featurelist', + 'layout.drop_feature', 'cmap', 'cmap14', 'sbix',