From e38d3a125e8bb4459e26cc4b42ee63f010c56ffb Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 2 Feb 2004 19:34:04 +0000 Subject: [PATCH] fixed bug in font name setting --- lib/modules/swffont.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index ba0b66e..f2727a4 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -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; -- 1.7.10.4