From: kramm Date: Wed, 7 Dec 2005 19:41:32 +0000 (+0000) Subject: fixed text extraction if the font doesn't have a (working) glyph2ascii X-Git-Tag: release-0-8-0~277 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=000164d3bcc2e284c9e972655431a3562d037cd3 fixed text extraction if the font doesn't have a (working) glyph2ascii --- diff --git a/src/swfdump.c b/src/swfdump.c index a74c453..5da07fc 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -275,8 +275,12 @@ void textcallback(void*self, int*glyphs, int*ypos, int nr, int fontid, int fonts if(glyphs[t] >= fonts[font]->numchars /*glyph is in range*/ || !fonts[font]->glyph2ascii /* font has ascii<->glyph mapping */ ) a = glyphs[t]; - else - a = fonts[font]->glyph2ascii[glyphs[t]]; + else { + if(fonts[font]->glyph2ascii[glyphs[t]]) + a = fonts[font]->glyph2ascii[glyphs[t]]; + else + a = glyphs[t]; + } } else { a = glyphs[t]; }