shithub: freetype+ttf2subf

Download patch

ref: 8b1f2a6cda1b0780e60f521a96e1422e48fb89e3
parent: 7630787a6a6b2d7bf5c61995f8521923a66f3e70
author: Werner Lemberg <[email protected]>
date: Mon Apr 14 03:58:19 EDT 2014

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

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-04-14  Werner Lemberg  <[email protected]>
+
+	[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 <[email protected]>
 
 	[smooth] Fix stand-alone compilation.
--- 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)" ));