From c97ce40e9cf09a58e8284bf6a50efa7033ce6478 Mon Sep 17 00:00:00 2001 From: kramm Date: Thu, 12 Aug 2004 12:57:29 +0000 Subject: [PATCH] added check against bad fonts. --- pdf2swf/swfoutput.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 7fc1b3a..525b1e2 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1059,6 +1059,12 @@ void swfoutput_setfont(struct swfoutput*obj, char*fontid, char*filename) swf_SetLoadFontParameters(32, 0); SWFFONT *swffont = swf_LoadFont(filename); + + if(!swffont) { + msg(" Coudln't load font %s (%s)", fontid, filename); + swffont = swf_LoadFont(0); + } + swf_FontSetID(swffont, ++currentswfid); if(screenloglevel >= LOGLEVEL_DEBUG) { -- 1.7.10.4