diff options
author | David Turner <david@freetype.org> | 2002-02-06 13:59:25 +0000 |
---|---|---|
committer | David Turner <david@freetype.org> | 2002-02-06 13:59:25 +0000 |
commit | a8c225cbaad0eed5d9e8bc34fb13874425fbdaf4 (patch) | |
tree | 0e4ed8ccfbe2728f98c4d9940f3db115be5dcddd | |
parent | a391b7e86f8958b53600ea52dc333a46103d4d62 (diff) | |
download | freetype2-a8c225cbaad0eed5d9e8bc34fb13874425fbdaf4.tar.gz |
support for embedded fonts in PDF documents. These
often do not have a 'cmap', 'post' and 'name' table and
were not loaded by FreeType previously..
(thanks to Derek B. Noonburgs from XPDF)
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/sfnt/sfobjs.c | 8 |
2 files changed, 13 insertions, 4 deletions
@@ -1,5 +1,14 @@ 2002-02-06 David Turner <david@freetype.org> + * src/sfnt/sfobjs.c (SFNT_Load_Face): since many fonts embedded in + PDF documents do not include 'cmap', 'post' and 'name' tables, the + SFNT face loader has been changed to not immediately report an + error if these are not present. + + Note that the specification _requires_ these tables, but Adobe + seems to ignore it completely.. + + * src/sfnt/ttcmap.c: removing compiler warnings * src/pcf/pcfread.c, src/pcf/pcf.h, src/pcf/pcfdriver.c: diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c index a8a5b767e..fddc3c8bd 100644 --- a/src/sfnt/sfobjs.c +++ b/src/sfnt/sfobjs.c @@ -296,10 +296,10 @@ if ( !is_apple_sbit && LOAD_( header ) ) goto Exit; - /* load other tables */ - if ( LOAD_( max_profile ) || - LOAD_( charmaps ) ) - goto Exit; + /* the following tables are often not present in embedded TrueType fonts */ + /* within PDF documents, so don't check for them.. */ + (void)LOAD_( max_profile ); + (void)LOAD_( charmaps ); /* the following tables are optional in PCL fonts -- */ /* don't check for errors */ |