From 979c1dc6e9391d5c29b8b48f8ebfb5d52600f6f5 Mon Sep 17 00:00:00 2001 From: kramm Date: Sat, 25 Jun 2005 13:43:25 +0000 Subject: [PATCH] removed getCharID() --- pdf2swf/swfoutput.cc | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 81cf8b0..301f808 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -170,8 +170,6 @@ static void swf_startframe(gfxdevice_t*dev, int width, int height); static void swf_endframe(gfxdevice_t*dev); static gfxresult_t* swf_finish(gfxdevice_t*driver); -int getCharID(SWFFONT *font, int charnr, char *charname, int u); - static swfoutput_internal* init_internal_struct() { swfoutput_internal*i = (swfoutput_internal*)malloc(sizeof(swfoutput_internal)); @@ -715,52 +713,6 @@ static void endtext(gfxdevice_t*dev) i->textid = -1; } -int getCharID(SWFFONT *font, int charnr, char *charname, int u) -{ - int t; - if(charname && font->glyphnames) { - 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; - } - } - /* if we didn't find the character, maybe - 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; - } - } - } - - if(u>0 && font->encoding != 255) { - /* 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(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 - 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]; - } - } - - if(charnr>=0 && charnrnumchars) { - msg(" Char [>%d<,%s,%d] maps to %d\n", charnr, charname, u, charnr); - return charnr; - } - - return -1; -} - /* set's the matrix which is to be applied to characters drawn by swfoutput_drawchar() */ static void swfoutput_setfontmatrix(gfxdevice_t*dev,double m11,double m21, double m12,double m22) -- 1.7.10.4