summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarsha <mm.harsha@gmail.com>2010-12-25 16:34:56 +0100
committerWerner Lemberg <wl@gnu.org>2010-12-25 16:34:56 +0100
commit7774ac67ec562add4212930c82e402a7d7cdff8b (patch)
tree861373c4bbd9da212b805fe9f925557437a8a949 /src
parent312d26a4915bcf7ca1e428f7bdf7ed631574dc13 (diff)
Apply Savannah patch #7422.
If we encouter a space in a string then the sbit buffer is NULL, height and width are 0s. So the check in ftc_snode_compare will always pass for spaces (comparision with 255). Here the comments above the condition are proper but the implementation is not. When we create an snode I think it is the proper way to initialize the width to 255 and then put a check for being equal to 255 in snode compare function. * src/cache/ftcsbits.c (FTC_SNode_New): Initialize sbit widths with value 255. (ftc_snode_compare): Fix condition.
Diffstat (limited to 'src')
-rw-r--r--src/cache/ftcsbits.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index 83245af1..0386bdd6 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -217,6 +217,7 @@
FTC_SFamilyClass clazz = FTC_CACHE__SFAMILY_CLASS( cache );
FT_UInt total;
+ FT_UInt node_count;
total = clazz->family_get_count( family, cache->manager );
@@ -239,6 +240,10 @@
FTC_GNode_Init( FTC_GNODE( snode ), start, family );
snode->count = count;
+ for ( node_count = 0; node_count < count; node_count++ )
+ {
+ snode->sbits[node_count].width = 255;
+ }
error = ftc_snode_load( snode,
cache->manager,
@@ -368,7 +373,7 @@
*
*/
- if ( sbit->buffer == NULL && sbit->width != 255 )
+ if ( sbit->buffer == NULL && sbit->width == 255 )
{
FT_ULong size;
FT_Error error;