From e9631a8e0e3870d2d758ba9c584210f64a202419 Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 7 Aug 2004 14:03:28 +0000 Subject: [PATCH] added swf_DummyFont(). --- lib/modules/swffont.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/modules/swffont.c b/lib/modules/swffont.c index c957878..49c5677 100644 --- a/lib/modules/swffont.c +++ b/lib/modules/swffont.c @@ -299,6 +299,8 @@ SWFFONT* swf_LoadTrueTypeFont(char*filename) static int t1lib_initialized = 0; +static int counter = 0; + SWFFONT* swf_LoadT1Font(char*filename) { SWFFONT * font; @@ -450,6 +452,13 @@ SWFFONT* swf_LoadT1Font(char*filename) #endif +SWFFONT* swf_DummyFont() +{ + SWFFONT*font = (SWFFONT*)malloc(sizeof(SWFFONT)); + memset(font, 0, sizeof(SWFFONT)); + return font; +} + static int isSWF(const char*filename) { FILE*fi = fopen(filename, "rb"); @@ -470,7 +479,10 @@ static int isSWF(const char*filename) SWFFONT* swf_LoadFont(char*filename) { - int is_swf = isSWF(filename); + int is_swf; + if(filename == 0) + return swf_DummyFont(); + is_swf = isSWF(filename); if(is_swf<0) return 0; if(is_swf) { -- 1.7.10.4