From 3879a8dc472680123cd6c3dd21c0e7002186fd08 Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 21 Sep 2004 13:03:57 +0000 Subject: [PATCH] added debugging messages to getCharID(). --- pdf2swf/swfoutput.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 3511eee..b4c1229 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1144,6 +1144,7 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) if(charname) { for(t=0;tnumchars;t++) { if(font->glyphnames[t] && !strcmp(font->glyphnames[t],charname)) { + msg(" Char [%d,>%s<,%d] maps to %d\n", charnr, charname, u, t); return t; } } @@ -1151,6 +1152,7 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) we can find the capitalized version */ for(t=0;tnumchars;t++) { if(font->glyphnames[t] && !strcasecmp(font->glyphnames[t],charname)) { + msg(" Char [%d,>>%s<<,%d] maps to %d\n", charnr, charname, u, t); return t; } } @@ -1159,11 +1161,13 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) if(u>0) { /* try to use the unicode id */ if(u>=0 && umaxascii && font->ascii2glyph[u]>=0) { + msg(" Char [%d,%s,>%d<] maps to %d\n", charnr, charname, u, font->ascii2glyph[u]); return font->ascii2glyph[u]; } } if(charnr>=0 && charnrnumchars) { + msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, charnr); return charnr; } @@ -1172,6 +1176,7 @@ int getCharID(SWFFONT *font, int charnr, char *charname, int u) is US-ASCII based. It's needed for fonts which return broken unicode indices */ if(charnr>=0 && charnrmaxascii && font->ascii2glyph[charnr]>=0) { + msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, font->ascii2glyph[charnr]); return font->ascii2glyph[charnr]; } } -- 1.7.10.4