X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswffont.c;h=df231e711b1c7f8aef89e52ee872ef8ea3caa60f;hb=91cad7c2baf4d257bd97bcea1244937c21c083cd;hp=75069e3d2c9b54d2774914fe9bfb5e6ff4d2aead;hpb=0784a8a882e7b98299fb6a90f0f9a7ebb322562b;p=swftools.git diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index 75069e3..df231e7 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -21,6 +21,10 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include +#include +#include "../rfxswf.h" + static int loadfont_scale = 4; static int skip_unused = 1; static int full_unicode = 0; @@ -165,7 +169,9 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) font->layout->leading = font->layout->ascent + font->layout->descent; font->layout->kerningcount = 0; - name = FT_Get_Postscript_Name(face); + name = face->family_name; + if(!(name && *name)) + name = FT_Get_Postscript_Name(face); if(name && *name) font->name = (U8*)strdup(name);