From d233482ef5b2988b31eeff2cc11eb7825f972915 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 13 Feb 2004 23:48:39 +0000 Subject: [PATCH] * src/base/ftobjs.c (FT_Set_Char_Size): Return immediately if ppem values don't change. Suggested by Graham Asher. --- ChangeLog | 5 +++++ src/base/ftobjs.c | 13 +++++++++++-- src/cache/ftcsbits.c | Bin 8675 -> 8675 bytes 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1b0fdd4f..202cc6dda 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-02-12 Werner Lemberg + + * src/base/ftobjs.c (FT_Set_Char_Size): Return immediately if + ppem values don't change. Suggested by Graham Asher. + 2004-02-11 Werner Lemberg * src/cid/cidload.c (cid_face_open): Always allocate diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index b48288c3c..5e7b28030 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -2042,8 +2042,17 @@ dim_x = ( char_width * horz_resolution + 36 ) / 72; dim_y = ( char_height * vert_resolution + 36 ) / 72; - metrics->x_ppem = (FT_UShort)( ( dim_x + 32 ) >> 6 ); - metrics->y_ppem = (FT_UShort)( ( dim_y + 32 ) >> 6 ); + { + FT_UShort x_ppem = (FT_UShort)( ( dim_x + 32 ) >> 6 ); + FT_UShort y_ppem = (FT_UShort)( ( dim_y + 32 ) >> 6 ); + + + if ( x_ppem == metrics->x_ppem && y_ppem == metrics->y_ppem ) + return + + metrics->x_ppem = x_ppem; + metrics->y_ppem = y_ppem; + } metrics->x_scale = 0x10000L; metrics->y_scale = 0x10000L; diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c index 98f68ee8ca7ec9292a3d3d730f34e619d5fcc732..941ef991410694ea6cfb0a991a2af85fc62f361c 100644 GIT binary patch delta 32 ocmaFt{MdQJcScSf1tS9k6NRM8iGlK)<(YbU8J#z;