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.
This commit is contained in:
parent
312d26a491
commit
7774ac67ec
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
2010-12-25 Harsha <mm.harsha@gmail.com>
|
||||
|
||||
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.
|
||||
|
||||
2010-12-13 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
Fix parameter handling of `FT_Set_Renderer'.
|
||||
|
7
src/cache/ftcsbits.c
vendored
7
src/cache/ftcsbits.c
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user