Commit 8b1f2a6cda1b0780e60f521a96e1422e48fb89e3

Werner Lemberg 2014-04-14T07:58:19

[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.

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)" ));