ref: 4f65eed89c37800ea69d938a29773eea8ac7b1d9
parent: 8744edfefb6e612d0a917ee9edd3a6d2f511efd9
author: Werner Lemberg <[email protected]>
date: Sat Apr 9 05:50:39 EDT 2005
src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values only if `fitted' is not zero.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-04-09 Werner Lemberg <[email protected]>
+
+ src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values only
+ if `fitted' is not zero.
+
2005-04-06 Werner Lemberg <[email protected]>
* src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]:
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -4,7 +4,7 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001, 2002, 2003, 2004 by */
+/* Copyright 2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -2031,7 +2031,8 @@
scaled = FT_MulFix( globals->blues.normal_top.zones->org_ref, y_scale );
fitted = FT_PIX_ROUND( scaled );
- if (scaled != fitted ) {
+ if ( fitted != 0 && scaled != fitted )
+ {
y_scale = FT_MulDiv( y_scale, fitted, scaled );
if ( fitted < scaled )