ref: 69d1a3609e207e2666ac3f67eb1798408ce8f5eb
parent: 7318b1aa2f519f0623001765dc6ed3174ecc61f9
author: Werner Lemberg <[email protected]>
date: Tue Dec 10 05:12:27 EST 2013
[truetype] Fix scaling of vertical phantom points. * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and pp4.x also.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2013-12-10 Werner Lemberg <[email protected]>
+ [truetype] Fix scaling of vertical phantom points.
+
+ * src/truetype/ttgload.c (load_truetype_glyph): Scale pp3.x and
+ pp4.x also.
+
+2013-12-10 Werner Lemberg <[email protected]>
+
[truetype] Fix positioning of composite glyphs.
Problem reported by Nigel Tao <[email protected]>.
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -1574,13 +1574,19 @@
FT_FREE( deltas );
}
-#endif
+#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+ /* scale phantom points, if necessary; */
+ /* they get rounded in `TT_Hint_Glyph' */
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
+ /* pp1.y and pp2.y are always zero */
+
+ loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );
loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );
+ loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );
loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
}
@@ -1695,11 +1701,17 @@
#endif /* TT_CONFIG_OPTION_GX_VAR_SUPPORT */
+ /* scale phantom points, if necessary; */
+ /* they get rounded in `TT_Hint_Glyph' */
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
+ /* pp1.y and pp2.y are always zero */
+
+ loader->pp3.x = FT_MulFix( loader->pp3.x, x_scale );
loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );
+ loader->pp4.x = FT_MulFix( loader->pp4.x, x_scale );
loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
}