[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master f37083e 3/3: [truetype] Fix copy-and-paste error (#56
From: |
Werner LEMBERG |
Subject: |
[freetype2] master f37083e 3/3: [truetype] Fix copy-and-paste error (#56409). |
Date: |
Wed, 29 May 2019 02:17:41 -0400 (EDT) |
branch: master
commit f37083edf0ef562fb8bae0dfc6f916b1037f71fe
Author: Ben Wagner <address@hidden>
Commit: Werner Lemberg <address@hidden>
[truetype] Fix copy-and-paste error (#56409).
* src/truetype/ttgload.c (load_truetype_glyph): Use correct indices
into `unrounded' array for phantom points.
---
ChangeLog | 7 +++++++
src/truetype/ttgload.c | 10 ++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3007333..9be6770 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-05-26 Ben Wagner <address@hidden>
+
+ [truetype] Fix copy-and-paste error (#56409).
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Use correct indices
+ into `unrounded' array for phantom points.
+
2019-05-29 Werner Lemberg <address@hidden>
[truetype] Fix 32bit builds (#56404).
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 2fc3eca..a046840 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -2018,11 +2018,13 @@
/* recalculate linear horizontal and vertical advances */
/* if we don't have HVAR and VVAR, respectively */
if ( !( face->variation_support & TT_FACE_FLAG_VAR_HADVANCE ) )
- loader->linear = FT_PIX_ROUND( unrounded[1].x -
- unrounded[0].x ) / 64;
+ loader->linear =
+ FT_PIX_ROUND( unrounded[outline.n_points - 3].x -
+ unrounded[outline.n_points - 4].x ) / 64;
if ( !( face->variation_support & TT_FACE_FLAG_VAR_VADVANCE ) )
- loader->vadvance = FT_PIX_ROUND( unrounded[3].x -
- unrounded[2].x ) / 64;
+ loader->vadvance =
+ FT_PIX_ROUND( unrounded[outline.n_points - 1].x -
+ unrounded[outline.n_points - 2].x ) / 64;
Exit1:
FT_FREE( outline.points );
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master f37083e 3/3: [truetype] Fix copy-and-paste error (#56409).,
Werner LEMBERG <=