some changes to ensure that the code compiles cleanly when TT_CONFIG_OPTION_POSTSCRIPT_NAMES is undefined..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index aa7b03b..0d616eb 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -24,6 +24,7 @@
#include <tttags.h>
#include <sfnt.h>
+#include <psnames.h>
#include <ttobjs.h>
#include <ttpload.h>
@@ -226,9 +227,10 @@
TT_Long face_index,
TT_Face face )
{
- TT_Error error;
- TT_ULong format_tag;
- SFNT_Interface* sfnt;
+ TT_Error error;
+ TT_ULong format_tag;
+ SFNT_Interface* sfnt;
+ PSNames_Interface* psnames;
sfnt = (SFNT_Interface*)face->sfnt;
if (!sfnt)
@@ -248,6 +250,18 @@
face->goto_table = sfnt->goto_table;
}
+ psnames = (PSNames_Interface*)face->psnames;
+ if (!psnames)
+ {
+ /* look-up the PSNames driver */
+ FT_Driver psnames_driver;
+
+ psnames_driver = FT_Get_Driver( face->root.driver->library, "psnames" );
+ if (psnames_driver)
+ face->psnames = (PSNames_Interface*)
+ (psnames_driver->interface.format_interface);
+ }
+
/* create input stream from resource */
if ( FILE_Seek(0) )
goto Exit;
@@ -291,13 +305,17 @@
LOAD_( charmaps ) ||
LOAD_( names ) ||
LOAD_( os2 ) ||
- LOAD_( psnames ) ||
+ LOAD_( psnames ) )
+ goto Exit;
- /* the optional tables */
+ /* the optional tables */
+
+ /* embedded bitmap support. */
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
- LOAD_( sbits ) ||
+ if (sfnt->load_sbits && LOAD_(sbits)) goto Exit;
#endif
- LOAD_( hdmx ) ||
+
+ if ( LOAD_( hdmx ) ||
LOAD_( gasp ) ||
LOAD_( kerning ) ||