Simplify code.

Suggested by Behdad.

* src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
call FT_Get_Next_Char anyway if necessary.
This commit is contained in:
Werner Lemberg 2010-02-27 08:10:11 +01:00
parent 2415cbf365
commit e0717d4f48
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2010-02-27 Werner Lemberg <wl@gnu.org>
Simplify code.
Suggested by Behdad.
* src/base/ftobjs.c (FT_Get_First_Char): Don't use a loop since we
call FT_Get_Next_Char anyway if necessary.
2010-02-26 Behdad Esfahbod <behdad@behdad.org>
Improve handling of invalid glyph indices in char->index functions.

View File

@ -3113,9 +3113,7 @@
{
gindex = FT_Get_Char_Index( face, 0 );
if ( gindex == 0 || gindex >= (FT_UInt)face->num_glyphs )
do {
result = FT_Get_Next_Char( face, 0, &gindex );
} while ( gindex >= (FT_UInt)face->num_glyphs );
result = FT_Get_Next_Char( face, 0, &gindex );
}
if ( agindex )