[autofit] Improve coverage handling. * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs appearing in the GPOS table if we are processing the default coverage.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/ChangeLog b/ChangeLog
index 91df4f8..ce0ef13 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-04-14 Werner Lemberg <wl@gnu.org>
+
+ [autofit] Improve coverage handling.
+
+ * src/autofit/hbshim.c (af_get_coverage): Don't exclude glyphs
+ appearing in the GPOS table if we are processing the default
+ coverage.
+
2014-04-13 David Weber <weber.aulendorf@googlemail.com>
[smooth] Fix stand-alone compilation.
diff --git a/src/autofit/hbshim.c b/src/autofit/hbshim.c
index 2eda8d7..ced5ce5 100644
--- a/src/autofit/hbshim.c
+++ b/src/autofit/hbshim.c
@@ -328,8 +328,15 @@
* out whether a glyph gets shifted vertically, but this is something I
* would like to avoid if not really necessary.
*
+ * Note that we don't follow this logic for the default coverage.
+ * Complex scripts like Devanagari have mandatory GPOS features to
+ * position many glyph elements, using mark-to-base or mark-to-ligature
+ * tables; the number of glyphs missed due to condition (b) would be far
+ * too large.
+ *
*/
- hb_set_subtract( gsub_glyphs, gpos_glyphs );
+ if ( style_class->coverage != AF_COVERAGE_DEFAULT )
+ hb_set_subtract( gsub_glyphs, gpos_glyphs );
#ifdef FT_DEBUG_LEVEL_TRACE
FT_TRACE4(( " glyphs without GPOS data (`*' means already assigned)" ));