[truetype] Fix previous commit. * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle unhinted phantom points, which must be properly scaled.
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
diff --git a/ChangeLog b/ChangeLog
index 013216e..9cdb5e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2017-12-18 Werner Lemberg <wl@gnu.org>
+ [truetype] Fix previous commit.
+
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph): Correctly handle
+ unhinted phantom points, which must be properly scaled.
+
+2017-12-18 Werner Lemberg <wl@gnu.org>
+
[truetype] Don't apply HVAR and VVAR deltas twice (#52683).
* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Always adjust
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 4b5af85..01f2f26 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -801,7 +801,7 @@
{
FT_TRACE1(( "TT_Hint_Glyph: too long instructions" ));
FT_TRACE1(( " (0x%lx byte) is truncated\n",
- loader->glyph->control_len ));
+ loader->glyph->control_len ));
}
n_ins = loader->glyph->control_len;
@@ -1041,7 +1041,8 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
/* if we have a HVAR table, `pp1' and/or `pp2' are already adjusted */
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
+ if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) ||
+ !IS_HINTED( loader->load_flags ) )
#endif
{
loader->pp1 = outline->points[n_points - 4];
@@ -1050,7 +1051,8 @@
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
/* if we have a VVAR table, `pp3' and/or `pp4' are already adjusted */
- if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
+ if ( !( loader->face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) ||
+ !IS_HINTED( loader->load_flags ) )
#endif
{
loader->pp3 = outline->points[n_points - 2];
@@ -1418,6 +1420,7 @@
TT_Driver driver = (TT_Driver)FT_FACE_DRIVER( loader->face );
#endif
+
#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
if ( driver->interpreter_version == TT_INTERPRETER_VERSION_38 )
{