git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4564167
)
fixed bug in font name setting
author
kramm
<kramm>
Mon, 2 Feb 2004 19:34:04 +0000
(19:34 +0000)
committer
kramm
<kramm>
Mon, 2 Feb 2004 19:34:04 +0000
(19:34 +0000)
lib/modules/swffont.c
patch
|
blob
|
history
diff --git
a/lib/modules/swffont.c
b/lib/modules/swffont.c
index
ba0b66e
..
f2727a4
100644
(file)
--- 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;
{
FT_Face face;
FT_Error error;
- const char* name;
+ const char* name = 0;
FT_ULong charcode;
FT_UInt gindex;
SWFFONT* font;
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;
font->layout->leading = -face->bbox.xMin;
font->layout->kerningcount = 0;
+ name = FT_Get_Postscript_Name(face);
if(name && *name)
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;
/* // Map Glyphs to Unicode, version 1 (quick and dirty):
int t;