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)
This commit is contained in:
David Turner 2002-02-06 13:59:25 +00:00
parent 0489328e97
commit 27f6a05ed5
2 changed files with 13 additions and 4 deletions

View File

@ -1,5 +1,14 @@
2002-02-06 David Turner <david@freetype.org> 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/sfnt/ttcmap.c: removing compiler warnings
* src/pcf/pcfread.c, src/pcf/pcf.h, src/pcf/pcfdriver.c: * src/pcf/pcfread.c, src/pcf/pcf.h, src/pcf/pcfdriver.c:

View File

@ -296,10 +296,10 @@
if ( !is_apple_sbit && LOAD_( header ) ) if ( !is_apple_sbit && LOAD_( header ) )
goto Exit; goto Exit;
/* load other tables */ /* the following tables are often not present in embedded TrueType fonts */
if ( LOAD_( max_profile ) || /* within PDF documents, so don't check for them.. */
LOAD_( charmaps ) ) (void)LOAD_( max_profile );
goto Exit; (void)LOAD_( charmaps );
/* the following tables are optional in PCL fonts -- */ /* the following tables are optional in PCL fonts -- */
/* don't check for errors */ /* don't check for errors */