From: kramm Date: Fri, 15 Oct 2004 09:46:25 +0000 (+0000) Subject: if font encoding is not unicode, try glyph[ascii2glyph[c]] before glyph[c] X-Git-Tag: release-0-6-3~311 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;ds=inline;h=428ec7f1a78a0111576a851166ec8a6b629120d7;p=swftools.git if font encoding is not unicode, try glyph[ascii2glyph[c]] before glyph[c] in getCharID(). --- diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 5d1c10f..25fa510 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1167,11 +1167,6 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) } } - if(charnr>=0 && charnrnumchars) { - msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, charnr); - return charnr; - } - if(font->encoding != FONT_ENCODING_UNICODE) { /* the following only works if the font encoding is US-ASCII based. It's needed for fonts which return broken unicode @@ -1180,8 +1175,13 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, font->ascii2glyph[charnr]); return font->ascii2glyph[charnr]; } + } + + if(charnr>=0 && charnrnumchars) { + msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, charnr); + return charnr; } - + return -1; }