From 62f8978794fd7736feaeaedd7ef3f62e1eb6a7eb Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Thu, 9 Dec 2004 22:57:18 +0000 Subject: [PATCH] * src/base/ftobjs.c (FT_Get_Kerning): Always round towards zero for FT_KERNING_DEFAULT. This greatly enhances the kerning for small ppem values. --- ChangeLog | 6 ++++++ src/base/ftobjs.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5929c89cb..a247f872a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-12-09 Werner Lemberg + + * src/base/ftobjs.c (FT_Get_Kerning): Always round towards zero + for FT_KERNING_DEFAULT. This greatly enhances the kerning for + small ppem values. + 2004-12-08 Werner Lemberg * src/base/ftobjs.c (ft_glyphslot_clear): Reset `lsb_delta' and diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index 4180508fc..31a7bff11 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2137,8 +2137,10 @@ if ( kern_mode != FT_KERNING_UNFITTED ) { - akerning->x = FT_PIX_ROUND( akerning->x ); - akerning->y = FT_PIX_ROUND( akerning->y ); + akerning->x = akerning->x > 0 ? FT_PIX_FLOOR( akerning->x ) + : FT_PIX_CEIL( akerning->x ); + akerning->y = akerning->y > 0 ? FT_PIX_FLOOR( akerning->y ) + : FT_PIX_CEIL( akerning->y ); } } }