X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpdf%2FGFXOutputDev.cc;fp=lib%2Fpdf%2FGFXOutputDev.cc;h=2596d25316c3bd60e2cf4f09cee87b6a94a6cc87;hp=da9ec41e0d7b3d90d260d5875d1de679b6b9a781;hb=fc815311aa1bd67877b404493838dfd85a86f596;hpb=02bea373211f87d9c3504a497489356bb0ea6ba4 diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index da9ec41..2596d25 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -1442,10 +1442,13 @@ void GFXOutputDev::drawChar(GfxState *state, double x, double y, gfxmatrix_t m = this->current_font_matrix; this->transformXY(state, x-originX, y-originY, &m.tx, &m.ty); //m.tx += originX; m.ty += originY; - - msg(" drawChar(%f,%f,c='%c' (%d), u=%d <%d>) CID=%d render=%d glyphid=%d font=%08x",m.tx,m.ty,(charid&127)>=32?charid:'?', charid, u, uLen, font->isCIDFont(), render, glyphid, current_gfxfont); - if((render == RENDER_FILL && !config_drawonlyshapes) || render == RENDER_INVISIBLE) { + msg(" drawChar(%f,%f,c='%c' (%d), u=%d <%d>) CID=%d render=%d glyphid=%d font=%08x",m.tx,m.ty,(charid&127)>=32?charid:'?', charid, u, uLen, font->isCIDFont(), render, glyphid, current_gfxfont); + + if((render == RENDER_FILL && !config_drawonlyshapes) || + (render == RENDER_FILLSTROKE && state->getTransformedLineWidth()<1.0) || + (render == RENDER_INVISIBLE)) { + int space = this->current_fontinfo->space_char; if(config_extrafontdata && space>=0 && m.m00 && !m.m01) { /* space char detection */ @@ -1478,6 +1481,7 @@ void GFXOutputDev::drawChar(GfxState *state, double x, double y, msg(" Some texts will be rendered as shape"); gfxglobals->textmodeinfo = 1; } + gfxline_t*glyph = current_gfxfont->glyphs[glyphid].line; gfxline_t*tglyph = gfxline_clone(glyph); gfxline_transform(tglyph, &m); @@ -1561,10 +1565,11 @@ GBool GFXOutputDev::beginType3Char(GfxState *state, double x, double y, double d gfxmatrix_t m = this->current_font_matrix; this->transformXY(state, 0, 0, &m.tx, &m.ty); - m.m00*=INTERNAL_FONT_SIZE; + + /*m.m00*=INTERNAL_FONT_SIZE; m.m01*=INTERNAL_FONT_SIZE; m.m10*=INTERNAL_FONT_SIZE; - m.m11*=INTERNAL_FONT_SIZE; + m.m11*=INTERNAL_FONT_SIZE;*/ if(!current_fontinfo || (unsigned)charid >= current_fontinfo->num_glyphs || !current_fontinfo->glyphs[charid]) { msg(" Invalid charid %d for font", charid); @@ -2039,6 +2044,8 @@ void GFXOutputDev::updateFont(GfxState *state) current_gfxfont = this->current_fontinfo->getGfxFont(); device->addfont(device, current_gfxfont); free(id); + + device->addfont(device, current_gfxfont); updateFontMatrix(state); }