From 100b970fba13286c2c160f876738a5b525581117 Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 12 Jun 2004 16:08:19 +0000 Subject: [PATCH] fixed missing font bug. --- pdf2swf/swfoutput.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 0ad1432..509a6e1 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -899,6 +899,11 @@ static void drawchar(struct swfoutput*obj, SWFFont*font, char*character, int cha if(usefonts && ! drawonlyshapes) { int charid = font->getSWFCharID(character, charnr); + if(charid<0) { + msg(" Didn't find %s in current charset (%s)", + FIXNULL(character),FIXNULL(font->getName())); + return; + } if(shapeid>=0) endshape(); if(textid<0) @@ -1228,7 +1233,7 @@ int SWFFont::getSWFCharID(char*name, int charnr) return getSWFCharID(this->standardtable[charnr], -1); } msg(" Didn't find character '%s' in font '%s'", FIXNULL(name), this->name); - return 0; + return -1; } int SWFFont::getWidth(char*name) -- 1.7.10.4