* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko. Don't apply deltas twice for non-phantom points. Spotted by Ben Wagner.
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
diff --git a/ChangeLog b/ChangeLog
index 8b71086..8496616 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2016-12-21 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Thinko.
+
+ Don't apply deltas twice for non-phantom points.
+
+ Spotted by Ben Wagner.
+
+2016-12-21 Werner Lemberg <wl@gnu.org>
+
[cff, truetype] Another try for #49829.
* src/cff/cffdrivr.c: Don't include
diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c
index ac6dcaf..db070e7 100644
--- a/src/autofit/afglobal.c
+++ b/src/autofit/afglobal.c
@@ -417,17 +417,8 @@
globals->hb_buf = NULL;
#endif
- globals->glyph_count = 0;
- globals->stem_darkening_for_ppem = 0;
- globals->darken_x = 0;
- globals->darken_y = 0;
- globals->standard_vertical_width = 0;
- globals->standard_horizontal_width = 0;
- globals->scale_down_factor = 0;
- /* no need to free this one! */
- globals->glyph_styles = NULL;
- globals->face = NULL;
-
+ /* no need to free `globals->glyph_styles'; */
+ /* it is part of the `globals' array */
FT_FREE( globals );
}
}
diff --git a/src/base/ftmm.c b/src/base/ftmm.c
index c352803..1b724ac 100644
--- a/src/base/ftmm.c
+++ b/src/base/ftmm.c
@@ -140,6 +140,13 @@
error = service->set_mm_design( face, num_coords, coords );
}
+ /* enforce recomputation of auto-hinting data */
+ if ( !error && face->autohint.finalizer )
+ {
+ face->autohint.finalizer( face->autohint.data );
+ face->autohint.data = NULL;
+ }
+
return error;
}
@@ -168,6 +175,13 @@
error = service->set_var_design( face, num_coords, coords );
}
+ /* enforce recomputation of auto-hinting data */
+ if ( !error && face->autohint.finalizer )
+ {
+ face->autohint.finalizer( face->autohint.data );
+ face->autohint.data = NULL;
+ }
+
return error;
}
@@ -224,6 +238,13 @@
error = service->set_mm_blend( face, num_coords, coords );
}
+ /* enforce recomputation of auto-hinting data */
+ if ( !error && face->autohint.finalizer )
+ {
+ face->autohint.finalizer( face->autohint.data );
+ face->autohint.data = NULL;
+ }
+
return error;
}
@@ -255,6 +276,13 @@
error = service->set_mm_blend( face, num_coords, coords );
}
+ /* enforce recomputation of auto-hinting data */
+ if ( !error && face->autohint.finalizer )
+ {
+ face->autohint.finalizer( face->autohint.data );
+ face->autohint.data = NULL;
+ }
+
return error;
}
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 3b73283..5a74ae7 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -2616,22 +2616,36 @@
FT_Pos delta_y = FT_MulFix( deltas_y[j], apply );
- /* To avoid double adjustment of advance width or height, */
- /* adjust phantom points only if there is no HVAR or VVAR */
- /* table, respectively. */
- if ( j != ( n_points - 3 ) ||
- !( face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
- outline->points[j].x += delta_x;
- if ( j != ( n_points - 2 ) ||
- !( face->variation_support & TT_FACE_FLAG_VAR_LSB ) )
+ if ( j < n_points - 3 )
+ {
outline->points[j].x += delta_x;
-
- if ( j != ( n_points - 1 ) ||
- !( face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
- outline->points[j].y += delta_y;
- if ( j != ( n_points - 0 ) ||
- !( face->variation_support & TT_FACE_FLAG_VAR_TSB ) )
outline->points[j].y += delta_y;
+ }
+ else
+ {
+ /* To avoid double adjustment of advance width or height, */
+ /* adjust phantom points only if there is no HVAR or VVAR */
+ /* support, respectively. */
+ if ( j == ( n_points - 3 ) ||
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_HADVANCE ) )
+ outline->points[j].x += delta_x;
+
+ else if ( j == ( n_points - 2 ) ||
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_LSB ) )
+ outline->points[j].x += delta_x;
+
+ else if ( j == ( n_points - 1 ) ||
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_VADVANCE ) )
+ outline->points[j].y += delta_y;
+
+ else if ( j == ( n_points - 0 ) ||
+ !( face->variation_support &
+ TT_FACE_FLAG_VAR_TSB ) )
+ outline->points[j].y += delta_y;
+ }
#ifdef FT_DEBUG_LEVEL_TRACE
if ( delta_x || delta_y )