summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2019-05-23 14:41:57 +0200
committerWerner Lemberg <wl@gnu.org>2019-05-23 14:41:57 +0200
commit306d2f6ccb5a05eb54c8de7ef07fc5b46f1649a1 (patch)
tree9667842afd818984be99e0806f39004c6979fd7a
parentc3be6f06b70bd6636cfdef0e3cf892151d6c7a1d (diff)
downloadfreetype2-306d2f6ccb5a05eb54c8de7ef07fc5b46f1649a1.tar.gz
[truetype] Draw glyphs without deltas in variation font (#56374).
* src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill `unrounded' array.
-rw-r--r--ChangeLog7
-rw-r--r--src/truetype/ttgxvar.c12
2 files changed, 15 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 716a0a307..fd57adea9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-05-23 Werner Lemberg <wl@gnu.org>
+
+ [truetype] Draw glyphs without deltas in variation font (#56374).
+
+ * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Always fill
+ `unrounded' array.
+
2019-05-21 Werner Lemberg <wl@gnu.org>
* src/truetype/ttinterp.c (opcode_name): Improve mnemonics.
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 1c24bc23d..33aec980b 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -3755,6 +3755,12 @@
if ( !face->doblend || !blend )
return FT_THROW( Invalid_Argument );
+ for ( i = 0; i < n_points; i++ )
+ {
+ unrounded[i].x = INT_TO_F26DOT6( outline->points[i].x );
+ unrounded[i].y = INT_TO_F26DOT6( outline->points[i].y );
+ }
+
if ( glyph_index >= blend->gv_glyphcnt ||
blend->glyphoffsets[glyph_index] ==
blend->glyphoffsets[glyph_index + 1] )
@@ -4101,10 +4107,8 @@
for ( i = 0; i < n_points; i++ )
{
- unrounded[i].x = INT_TO_F26DOT6( outline->points[i].x ) +
- FT_fixedToFdot6( point_deltas_x[i] );
- unrounded[i].y = INT_TO_F26DOT6( outline->points[i].y ) +
- FT_fixedToFdot6( point_deltas_y[i] );
+ unrounded[i].x += FT_fixedToFdot6( point_deltas_x[i] );
+ unrounded[i].y += FT_fixedToFdot6( point_deltas_y[i] );
outline->points[i].x += FT_fixedToInt( point_deltas_x[i] );
outline->points[i].y += FT_fixedToInt( point_deltas_y[i] );