src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values only

if `fitted' is not zero.
This commit is contained in:
Werner Lemberg 2005-04-09 09:50:39 +00:00
parent 8744edfefb
commit 4f65eed89c
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-04-09 Werner Lemberg <wl@gnu.org>
src/pshinter/pshalgo.c (ps_hints_apply): Change scaling values only
if `fitted' is not zero.
2005-04-06 Werner Lemberg <wl@gnu.org>
* src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]:

View File

@ -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 )