Commit 86d997e5b1c401db06114b51d44d1bef6c7fe994

Ben Wagner 2019-05-26T09:37:41

* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.

diff --git a/ChangeLog b/ChangeLog
index fd57ade..5b6b559 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2019-05-26  Ben Wagner  <bungeman@google.com>
+
+	* src/truetype/ttgload.c (TT_Process_Simple_Glyph): Improve accuracy.
+
 2019-05-23  Werner Lemberg  <wl@gnu.org>
 
 	[truetype] Draw glyphs without deltas in variation font (#56374).
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index d214f87..2fc3eca 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1083,14 +1083,11 @@
         {
           FT_Vector*  u = unrounded;
 
-          FT_Fixed  xs = x_scale >> 6;
-          FT_Fixed  ys = y_scale >> 6;
-
 
           for ( ; vec < limit; vec++, u++ )
           {
-            vec->x = FT_MulFix( u->x, xs );
-            vec->y = FT_MulFix( u->y, ys );
+            vec->x = ( FT_MulFix( u->x, x_scale ) + 32 ) >> 6;
+            vec->y = ( FT_MulFix( u->y, y_scale ) + 32 ) >> 6;
           }
         }
         else