[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.
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
diff --git a/ChangeLog b/ChangeLog
index 84ae8fa..c2e0c46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2015-09-03 Werner Lemberg <wl@gnu.org>
+
+ [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 <wl@gnu.org>
[autofit] Code clean-up.
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index 905408b..0ade4be 100644
--- 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 );
diff --git a/src/autofit/afcjk.h b/src/autofit/afcjk.h
index bfd11f2..e395e74 100644
--- a/src/autofit/afcjk.h
+++ b/src/autofit/afcjk.h
@@ -115,7 +115,8 @@ FT_BEGIN_HEADER
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 );
diff --git a/src/autofit/afdummy.c b/src/autofit/afdummy.c
index 03ca25f..18dd301 100644
--- a/src/autofit/afdummy.c
+++ b/src/autofit/afdummy.c
@@ -38,11 +38,14 @@
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 );
if ( !error )
diff --git a/src/autofit/afindic.c b/src/autofit/afindic.c
index 7412cd1..05b6bdd 100644
--- 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 );
}
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 3065895..ae2c46d 100644
--- 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 )
{
@@ -2845,6 +2846,8 @@
AF_LatinAxis axis;
+ FT_UNUSED( glyph_index );
+
error = af_glyph_hints_reload( hints, outline );
if ( error )
diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c
index ac9f933..0380ffc 100644
--- a/src/autofit/aflatin2.c
+++ b/src/autofit/aflatin2.c
@@ -2300,13 +2300,16 @@
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 );
if ( error )
diff --git a/src/autofit/afloader.c b/src/autofit/afloader.c
index 7c2fa7c..722ffd3 100644
--- 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 );
}
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index fdf7978..d6b1bf7 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -217,7 +217,8 @@ extern void* _af_debug_hints;
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 );