From 4f65eed89c37800ea69d938a29773eea8ac7b1d9 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sat, 9 Apr 2005 09:50:39 +0000 Subject: [PATCH] src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values only if `fitted' is not zero. --- ChangeLog | 5 +++++ src/pshinter/pshalgo.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 242841ceb..8f146a559 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-09 Werner Lemberg + + src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values only + if `fitted' is not zero. + 2005-04-06 Werner Lemberg * src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]: diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c index 5f077d54d..8bf9c6a9e 100644 --- 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 )