X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=pdf2swf%2FSWFOutputDev.cc;h=f6274bbc629167a9fa163ec4de7f8e72ec78f031;hp=6dafd03fd4ac78e68e6e9db241bdcb6760b5d8bf;hb=b8573ee9e8a629c9a19f614ca3c4d64c93901eab;hpb=b69fc4379deedfda6a8ccca568c6bebcf1433150 diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index 6dafd03..f6274bb 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -636,7 +636,6 @@ void SWFOutputDev::beginString(GfxState *state, GString *s) swfoutput_setfontmatrix(&output, m11, -m21, m12, -m22); } -int charcounter = 0; void SWFOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, @@ -649,7 +648,7 @@ void SWFOutputDev::drawChar(GfxState *state, double x, double y, GfxFont*font = state->getFont(); if(font->getType() == fontType3) { - /* type 3 chars are passed primarily as graphics */ + /* type 3 chars are passed as graphics */ return; } double x1,y1; @@ -661,37 +660,29 @@ void SWFOutputDev::drawChar(GfxState *state, double x, double y, if(_u) u = *_u; - msg(" drawChar(%f,%f,%f,%f,c='%c' (%d),u=%d) CID=%d\n",x,y,dx,dy,c,c,u, font->isCIDFont()); + msg(" drawChar(%f,%f,%f,%f,c='%c' (%d),u=%d <%d>) CID=%d\n",x,y,dx,dy,c,c,u, uLen, font->isCIDFont()); - if(font->isCIDFont()) { + /* find out the character name */ + char*name=0; + if(font->isCIDFont() && u) { GfxCIDFont*cfont = (GfxCIDFont*)font; - char*name=0; - if(u) { - int t; - for(t=0;tgetEncoding(); - if(enc && enc[c]) - swfoutput_drawchar(&output, x1, y1, enc[c], c, u); - else { - swfoutput_drawchar(&output, x1, y1, 0, c, u); - } + name = enc[c]; } + + int ret = swfoutput_drawchar(&output, x1, y1, name, c, u); } void SWFOutputDev::endString(GfxState *state)