[truetype] Adjust number of glyphs for malformed `loca' tables.

* src/truetype/ttpload.c (tt_face_load_loca): Implement it.
This commit is contained in:
Werner Lemberg 2015-09-30 10:26:10 +02:00
parent 52aad9dfc6
commit 8651f37ad5
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2015-09-30 Werner Lemberg <wl@gnu.org>
[truetype] Adjust number of glyphs for malformed `loca' tables.
* src/truetype/ttpload.c (tt_face_load_loca): Implement it.
2015-09-29 Werner Lemberg <wl@gnu.org>
[pshinter] Avoid harmless overflow (#45984).

View File

@ -152,6 +152,14 @@
FT_TRACE2(( "adjusting num_locations to %d\n",
face->num_locations ));
}
else
{
face->root.num_glyphs = face->num_locations
? (FT_Long)face->num_locations - 1 : 0;
FT_TRACE2(( "adjusting num_glyphs to %d\n",
face->root.num_glyphs ));
}
}
}