shithub: freetype+ttf2subf

Download patch

ref: 8cbbcf6b985895b0dc4ce6a43afca85b36e8de24
parent: 40103a3af089857e553f39c3b9ce61a9ee38dd59
author: Werner Lemberg <[email protected]>
date: Thu Sep 3 02:47:30 EDT 2015

[autofit] Pass glyph index to hinting function.

No functionality change yet.

* src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
glyph index.

* src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
(af_indic_hints_apply), src/autofit/aflatin.c
(af_latin_hints_apply), src/autofit/aflatin2.c
(af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
Updated.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2015-09-03  Werner Lemberg  <[email protected]>
+
+	[autofit] Pass glyph index to hinting function.
+
+	No functionality change yet.
+
+	* src/autofit/aftypes.h (AF_WritingSystem_ApplyHintsFunc): Pass
+	glyph index.
+
+	* src/autofit/afcjk.c, src/autofit/afcjk.h (af_cjk_hints_apply),
+	src/autofit/afdummy.c (af_dummy_hints_apply), src/autofit/afindic.c
+	(af_indic_hints_apply), src/autofit/aflatin.c
+	(af_latin_hints_apply), src/autofit/aflatin2.c
+	(af_latin2_hints_apply), src/autofit/afloader.c (af_loader_load_g):
+	Updated.
+
 2015-08-30  Werner Lemberg  <[email protected]>
 
 	[autofit] Code clean-up.
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -2181,7 +2181,8 @@
   /* Apply the complete hinting algorithm to a CJK glyph. */
 
   FT_LOCAL_DEF( FT_Error )
-  af_cjk_hints_apply( AF_GlyphHints  hints,
+  af_cjk_hints_apply( FT_UInt        glyph_index,
+                      AF_GlyphHints  hints,
                       FT_Outline*    outline,
                       AF_CJKMetrics  metrics )
   {
@@ -2189,6 +2190,7 @@
     int       dim;
 
     FT_UNUSED( metrics );
+    FT_UNUSED( glyph_index );
 
 
     error = af_glyph_hints_reload( hints, outline );
--- a/src/autofit/afcjk.h
+++ b/src/autofit/afcjk.h
@@ -115,7 +115,8 @@
                      AF_CJKMetrics  metrics );
 
   FT_LOCAL( FT_Error )
-  af_cjk_hints_apply( AF_GlyphHints  hints,
+  af_cjk_hints_apply( FT_UInt        glyph_index,
+                      AF_GlyphHints  hints,
                       FT_Outline*    outline,
                       AF_CJKMetrics  metrics );
 
--- a/src/autofit/afdummy.c
+++ b/src/autofit/afdummy.c
@@ -38,10 +38,13 @@
 
 
   static FT_Error
-  af_dummy_hints_apply( AF_GlyphHints  hints,
+  af_dummy_hints_apply( FT_UInt        glyph_index,
+                        AF_GlyphHints  hints,
                         FT_Outline*    outline )
   {
     FT_Error  error;
+
+    FT_UNUSED( glyph_index );
 
 
     error = af_glyph_hints_reload( hints, outline );
--- a/src/autofit/afindic.c
+++ b/src/autofit/afindic.c
@@ -79,12 +79,13 @@
 
 
   static FT_Error
-  af_indic_hints_apply( AF_GlyphHints  hints,
+  af_indic_hints_apply( FT_UInt        glyph_index,
+                        AF_GlyphHints  hints,
                         FT_Outline*    outline,
                         AF_CJKMetrics  metrics )
   {
     /* use CJK routines */
-    return af_cjk_hints_apply( hints, outline, metrics );
+    return af_cjk_hints_apply( glyph_index, hints, outline, metrics );
   }
 
 
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -2836,7 +2836,8 @@
   /* Apply the complete hinting algorithm to a latin glyph. */
 
   static FT_Error
-  af_latin_hints_apply( AF_GlyphHints    hints,
+  af_latin_hints_apply( FT_UInt          glyph_index,
+                        AF_GlyphHints    hints,
                         FT_Outline*      outline,
                         AF_LatinMetrics  metrics )
   {
@@ -2844,6 +2845,8 @@
     int       dim;
 
     AF_LatinAxis  axis;
+
+    FT_UNUSED( glyph_index );
 
 
     error = af_glyph_hints_reload( hints, outline );
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -2300,12 +2300,15 @@
 
 
   static FT_Error
-  af_latin2_hints_apply( AF_GlyphHints    hints,
+  af_latin2_hints_apply( FT_UInt          glyph_index,
+                         AF_GlyphHints    hints,
                          FT_Outline*      outline,
                          AF_LatinMetrics  metrics )
   {
     FT_Error  error;
     int       dim;
+
+    FT_UNUSED( glyph_index );
 
 
     error = af_glyph_hints_reload( hints, outline );
--- a/src/autofit/afloader.c
+++ b/src/autofit/afloader.c
@@ -150,7 +150,8 @@
 
 
         if ( writing_system_class->style_hints_apply )
-          writing_system_class->style_hints_apply( hints,
+          writing_system_class->style_hints_apply( glyph_index,
+                                                   hints,
                                                    &gloader->base.outline,
                                                    metrics );
       }
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -217,7 +217,8 @@
                                      AF_StyleMetrics  metrics );
 
   typedef void
-  (*AF_WritingSystem_ApplyHintsFunc)( AF_GlyphHints    hints,
+  (*AF_WritingSystem_ApplyHintsFunc)( FT_UInt          glyph_index,
+                                      AF_GlyphHints    hints,
                                       FT_Outline*      outline,
                                       AF_StyleMetrics  metrics );