From: kramm Date: Sat, 12 Jun 2004 16:08:19 +0000 (+0000) Subject: fixed missing font bug. X-Git-Tag: release-0-6-0~107 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;ds=sidebyside;h=100b970fba13286c2c160f876738a5b525581117;p=swftools.git fixed missing font bug. --- 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)