From 4afc52152bcc97a99160b712d7b8fdeb7149b45b Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 1 May 2002 08:38:08 +0000 Subject: [PATCH] * src/sfnt/ttload.c (TT_Load_Names): applied a small work-around to manage fonts containing a broken name table (e.g. "hya6gb.ttf") --- src/sfnt/ttload.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c index bbef66565..0f6788c14 100644 --- a/src/sfnt/ttload.c +++ b/src/sfnt/ttload.c @@ -987,6 +987,12 @@ /* check the 'storageOffset' field */ storageOffset = names->storageOffset; + + /* some broken asian fonts have a storage offset whose value is */ + /* 12*numNameRecords. We deal with them here.. */ + if ( storageOffset == 12 * names->numNameRecords ) + storageOffset += 6; + if ( storageOffset < (FT_ULong)( 6 + 12 * names->numNameRecords ) || table_len <= storageOffset ) {