From 428ec7f1a78a0111576a851166ec8a6b629120d7 Mon Sep 17 00:00:00 2001 From: kramm Date: Fri, 15 Oct 2004 09:46:25 +0000 Subject: [PATCH] if font encoding is not unicode, try glyph[ascii2glyph[c]] before glyph[c] in getCharID(). --- pdf2swf/swfoutput.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; } -- 1.7.10.4