[sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).

* src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
reject too large glyph indices.
This commit is contained in:
Werner Lemberg 2015-10-01 14:16:03 +02:00
parent 8bbcfb2c2f
commit 5f8f44d218
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2015-10-01 Werner Lemberg <wl@gnu.org>
[sfnt] Make `tt_cmap4_char_map_linear' faster (#46078).
* src/sfnt/ttcmap.c (tt_cmap4_char_map_linear): Use inner loop to
reject too large glyph indices.
2015-09-30 Alexei Podtelezhnikov <apodtele@gmail.com>
[smooth] Clean up worker.

View File

@ -1115,7 +1115,11 @@
gindex = TT_PEEK_USHORT( r );
if ( gindex )
{
gindex = (FT_UInt)( (FT_Int)gindex + delta ) & 0xFFFFU;
if ( gindex >= (FT_UInt)face->root.num_glyphs )
gindex = 0;
}
}
else
{