From 1c044d7d29405644d29ae7fa105342365c517699 Mon Sep 17 00:00:00 2001 From: David Turner Date: Sat, 15 Mar 2003 13:29:49 +0000 Subject: [PATCH] * src/truetyoe/ttdriver.c (Set_Char_Sizes): fixed a small rounding bug. Actually, it seems that previous versions of FreeType didn't perform TrueType rounding exactly as appropriate. --- ChangeLog | 6 ++++++ src/truetype/ttdriver.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73319f549..f8c12ae71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-15 David Turner + + * src/truetyoe/ttdriver.c (Set_Char_Sizes): fixed a small rounding bug. + Actually, it seems that previous versions of FreeType didn't perform + TrueType rounding exactly as appropriate. + 2003-03-14 David Turner * src/truetype/ttdriver.c: fixing the small TrueType native rendering diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c index 174cd8543..0b5660228 100644 --- a/src/truetype/ttdriver.c +++ b/src/truetype/ttdriver.c @@ -207,8 +207,8 @@ /* we need to use rounding in the following computations. Otherwise, * the resulting hinted outlines will be very slightly distorted */ - dim_x = ( ( ( char_width * horz_resolution ) / 72 ) + 32 ) & -64; - dim_y = ( ( ( char_height * vert_resolution ) / 72 ) + 32 ) & -64; + dim_x = ( ( char_width * horz_resolution + (36+32*72) ) / 72 ) & -64; + dim_y = ( ( char_height * vert_resolution + (36+32*72) ) / 72 ) & -64; } else {