X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fmodules%2Fswffont.c;h=f8f7707e749c41ad902fe1928e7b6fa4acefe5c1;hp=ba0b66e6f09d8bb61744fd6e056158ec267da7d1;hb=c17ea569d3883466bc247f479ab202ff9ce7c638;hpb=c32b62c37628a900047e324f7c65b6deac619eb6 diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index ba0b66e..f8f7707 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -21,7 +21,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef USE_FREETYPE +#ifdef HAVE_FREETYPE #include #include @@ -89,7 +89,7 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) { FT_Face face; FT_Error error; - const char* name; + const char* name = 0; FT_ULong charcode; FT_UInt gindex; SWFFONT* font; @@ -135,8 +135,9 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) font->layout->leading = -face->bbox.xMin; font->layout->kerningcount = 0; + name = FT_Get_Postscript_Name(face); if(name && *name) - font->name = (U8*)strdup(FT_Get_Postscript_Name(face)); + font->name = (U8*)strdup(name); /* // Map Glyphs to Unicode, version 1 (quick and dirty): int t; @@ -243,7 +244,7 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) return font; } -#else //USE_FREETYPE +#else //HAVE_FREETYPE SWFFONT* swf_LoadTrueTypeFont(char*filename) { @@ -430,7 +431,7 @@ SWFFONT* swf_LoadFont(char*filename) if(isSWF(filename)) { return swf_ReadFont(filename); } -#if defined(USE_FREETYPE) +#if defined(HAVE_FREETYPE) return swf_LoadTrueTypeFont(filename); #elif defined(HAVE_T1LIB) return swf_LoadT1Font(filename);