[sfnt] Return correct number of named instances for TTCs.
Without this patch, requesting information for face index N returned the data for face index N+1 (or index 0). * src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index' for negative `face_instance_index' values.
This commit is contained in:
parent
24be60b5f1
commit
63765a8f2a
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2017-01-01 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[sfnt] Return correct number of named instances for TTCs.
|
||||
|
||||
Without this patch, requesting information for face index N returned
|
||||
the data for face index N+1 (or index 0).
|
||||
|
||||
* src/sfnt/sfobjs.c (sfnt_init_face): Correctly adjust `face_index'
|
||||
for negative `face_instance_index' values.
|
||||
|
||||
2016-12-31 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
*/*: Use hex numbers for errors in tracing messages.
|
||||
|
@ -909,6 +909,10 @@
|
||||
|
||||
face_index = FT_ABS( face_instance_index ) & 0xFFFF;
|
||||
|
||||
/* value -(N+1) requests information on index N */
|
||||
if ( face_instance_index < 0 )
|
||||
face_index--;
|
||||
|
||||
if ( face_index >= face->ttc_header.count )
|
||||
{
|
||||
if ( face_instance_index >= 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user