[sfnt] Minor improvement for handling kern tables.
* src/sfnt/ttkern.c (tt_face_load_kern): Don't check for cross-stream kerning tables since we reject format 2 tables later on anyways. Modify code for limit test... (tt_face_get_kerning): ... to avoid a limit test here.
This commit is contained in:
parent
c22a9aa245
commit
565f5a7d19
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2017-03-27 Wojciech Mamrak <wmamrak@gmail.com>
|
||||||
|
|
||||||
|
[sfnt] Minor improvement for handling kern tables.
|
||||||
|
|
||||||
|
* src/sfnt/ttkern.c (tt_face_load_kern): Don't check for
|
||||||
|
cross-stream kerning tables since we reject format 2 tables later
|
||||||
|
on anyways.
|
||||||
|
Modify code for limit test...
|
||||||
|
(tt_face_get_kerning): ... to avoid a limit test here.
|
||||||
|
|
||||||
2017-03-27 Werner Lemberg <wl@gnu.org>
|
2017-03-27 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[pcf] Fix compiler warnings.
|
[pcf] Fix compiler warnings.
|
||||||
|
|
|
@ -108,8 +108,8 @@
|
||||||
p_next = p_limit;
|
p_next = p_limit;
|
||||||
|
|
||||||
/* only use horizontal kerning tables */
|
/* only use horizontal kerning tables */
|
||||||
if ( ( coverage & ~8U ) != 0x0001 ||
|
if ( ( coverage & 3U ) != 0x0001 ||
|
||||||
p + 8 > p_limit )
|
p + 8 > p_next )
|
||||||
goto NextTable;
|
goto NextTable;
|
||||||
|
|
||||||
num_pairs = FT_NEXT_USHORT( p );
|
num_pairs = FT_NEXT_USHORT( p );
|
||||||
|
@ -214,8 +214,7 @@
|
||||||
if ( ( face->kern_avail_bits & mask ) == 0 )
|
if ( ( face->kern_avail_bits & mask ) == 0 )
|
||||||
goto NextTable;
|
goto NextTable;
|
||||||
|
|
||||||
if ( p + 8 > next )
|
FT_ASSERT( p + 8 <= next ); /* tested in tt_face_load_kern */
|
||||||
goto NextTable;
|
|
||||||
|
|
||||||
num_pairs = FT_NEXT_USHORT( p );
|
num_pairs = FT_NEXT_USHORT( p );
|
||||||
p += 6;
|
p += 6;
|
||||||
|
|
Loading…
Reference in New Issue