pass type3 characters as "dummy" characters
[swftools.git] / lib / devices / text.c
index 87b786c..d5b4bbc 100644 (file)
@@ -120,9 +120,13 @@ void text_drawchar(gfxdevice_t*dev, gfxfont_t*font, int glyphnr, gfxcolor_t*colo
     } else if(xshift > i->lastadvance*1.3 || xshift<0) {
         addchar(dev, 32);
     }
-    i->lastadvance = font->glyphs[glyphnr].advance*matrix->m00;
-
-    int u = font->glyphs[glyphnr].unicode;
+    if(font) {
+       i->lastadvance = font->glyphs[glyphnr].advance*matrix->m00;
+       int u = font->glyphs[glyphnr].unicode;
+    } else {
+       u = glyphnr;
+       i->currentx = 0;i->currenty = 0;
+    }
     if(u>13) {
         addchar(dev, u);
     }