use xpdf to write out embedded TTF fonts.
[swftools.git] / pdf2swf / swfoutput.cc
index 63c33cb..509a6e1 100644 (file)
@@ -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("<warning> Didn't find %s in current charset (%s)", 
+                   FIXNULL(character),FIXNULL(font->getName()));
+           return;
+       }
         if(shapeid>=0)
             endshape();
         if(textid<0)
@@ -1068,7 +1073,6 @@ SWFFont::SWFFont(char*name, int id, char*filename)
             t=0;
         }
     }
-    printf("done\n");
 }
 
 /* free all tables, write out definefont tags */
@@ -1229,7 +1233,7 @@ int SWFFont::getSWFCharID(char*name, int charnr)
        return getSWFCharID(this->standardtable[charnr], -1);
     }
     msg("<warning> Didn't find character '%s' in font '%s'", FIXNULL(name), this->name);
-    return 0;
+    return -1;
 }
 
 int SWFFont::getWidth(char*name)