X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=inline;f=pdf2swf%2FSWFOutputDev.cc;h=eb12157edc1e0e71895a8a66eecfe0ba33bd8c78;hb=f57077f3f4f3583c51dd83ec0989d600b1436b88;hp=58fb1a2c4abfd5a5aed927a9860459d2a1f703af;hpb=491209fb0a164d281924844fc8b032e6fb138909;p=swftools.git diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index 58fb1a2..eb12157 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -645,6 +645,9 @@ void SWFOutputDev::beginString(GfxState *state, GString *s) m11 *= state->getHorizScaling(); m21 *= state->getHorizScaling(); swfoutput_setfontmatrix(&output, m11, -m21, m12, -m22); + + msg(" fontmatrix %7.3f %7.3f\n", m11,-m21); + msg(" fontmatrix %7.3f %7.3f\n", m12,-m22); } void SWFOutputDev::drawChar(GfxState *state, double x, double y, @@ -693,6 +696,9 @@ void SWFOutputDev::drawChar(GfxState *state, double x, double y, msg(" drawChar(%f,%f,c='%c' (%d),u=%d <%d>) CID=%d name=\"%s\"\n",x,y,(c&127)>=32?c:'?',c,u, uLen, font->isCIDFont(), FIXNULL(name)); + x1 = (int)(x1+0.5); + y1 = (int)(y1+0.5); + int ret = swfoutput_drawchar(&output, x1, y1, name, c, u); } @@ -1175,9 +1181,12 @@ void SWFOutputDev::updateFont(GfxState *state) } // look for Type 3 font - if (!type3Warning && gfxFont->getType() == fontType3) { - type3Warning = gTrue; - showFontError(gfxFont, 2); + if (gfxFont->getType() == fontType3) { + if(!type3Warning) { + type3Warning = gTrue; + showFontError(gfxFont, 2); + } + return; } /* now either load the font, or find a substitution */ @@ -1205,7 +1214,7 @@ void SWFOutputDev::updateFont(GfxState *state) } if(!fileName) { char * fontname = getFontName(gfxFont); - msg(" Font %s could not be loaded.", fontname); + msg(" Font %s %scould not be loaded.", fontname, embedded?"":"(not embedded) "); msg(" Try putting a TTF version of that font (named \"%s.ttf\") into /swftools/fonts", fontname); fileName = substituteFont(gfxFont, fontid); }