summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-04-09 13:30:26 -0400
committerBehdad Esfahbod <behdad@behdad.org>2009-04-09 13:30:26 -0400
commit2fc08eeb9daeabd9fbac1e8ae409581117601bb5 (patch)
treec0b307d0684da3f6dd35aef6a212bbe6fba7fbef
parentc5921ca904f3ab25f975e4c719c7334a31d84434 (diff)
downloadpango-2fc08eeb9daeabd9fbac1e8ae409581117601bb5.tar.gz
Bug 577952 – Error loading {GDEF,GSUB,GPOS} table 0x6EAD1.24.1
Detect TrueType Collections by checking the font data header instead of checking for "face->num_faces >1".
-rw-r--r--pango/opentype/harfbuzz-stream.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/pango/opentype/harfbuzz-stream.c b/pango/opentype/harfbuzz-stream.c
index a3c3ab5e..6d35479f 100644
--- a/pango/opentype/harfbuzz-stream.c
+++ b/pango/opentype/harfbuzz-stream.c
@@ -167,7 +167,7 @@ _hb_font_goto_table( HB_Font font,
{
HB_Stream stream = font->stream;
- HB_UInt offset = 0;
+ HB_UInt offset = 0, sig;
HB_UInt count, nn;
HB_Error error;
@@ -190,7 +190,14 @@ _hb_font_goto_table( HB_Font font,
* FreeType's built-in data structures
*/
- if ( font->num_faces > 1 )
+ if ( FILE_Seek( 0 ) || ACCESS_Frame( 4 ) )
+ goto Exit;
+
+ sig = GET_Tag4();
+
+ FORGET_Frame();
+
+ if ( sig == HB_MAKE_TAG( 't', 't', 'c', 'f' ) )
{
/* deal with TrueType collections */
LOG(( ">> This is a TrueType Collection\n" ));