From 8744edfefb6e612d0a917ee9edd3a6d2f511efd9 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 6 Apr 2005 14:48:55 +0000 Subject: [PATCH] * src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]: Fix typo which sometimes causes wrong metrics for the last glyph. --- ChangeLog | 5 +++++ src/truetype/ttgload.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6e38631bd..242841ceb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-06 Werner Lemberg + + * src/truetype/ttgload.c (tt_face_get_metrics) [FT_OPTIMIZE_MEMORY]: + Fix typo which sometimes causes wrong metrics for the last glyph. + 2005-04-04 David Turner * devel/ftoption.h, include/freetype/config/ftoption.h diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index e4fe8f6d5..d1ad181b8 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -75,7 +75,7 @@ /*************************************************************************/ /* */ /* */ - /* TT_Get_Metrics */ + /* tt_face_get_metrics */ /* */ /* */ /* Returns the horizontal or vertical metrics in font units for a */ @@ -132,7 +132,7 @@ if ( idx < (FT_UInt)k ) { p += 4 * idx; - if ( p + 4 >= limit ) + if ( p + 4 > limit ) goto NoData; *aadvance = FT_NEXT_USHORT( p );