X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FGFXOutputDev.cc;h=a1ddba9e9e7a75b9cdcc59a947bc6bf1150d05cf;hb=232c3195bde361c9f0864997481ef6565bb76c72;hp=0f070ac062d2b9b81bb486a604bf952a4c2aeb60;hpb=4499caa9287f6ad9b1c96e007504478c1f6089b5;p=swftools.git diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index 0f070ac..a1ddba9 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -852,7 +852,7 @@ GFXOutputDev::~GFXOutputDev() free(this->pages); this->pages = 0; } - gfxfontlist_free(this->gfxfontlist); + gfxfontlist_free(this->gfxfontlist, 1); }; GBool GFXOutputDev::upsideDown() { @@ -965,6 +965,8 @@ void GFXOutputDev::drawChar(GfxState *state, double x, double y, // check for invisible text -- this is used by Acrobat Capture if (render == RENDER_INVISIBLE) { col.a = 0; + if(!config_extrafontdata) + return; } GfxFont*font = state->getFont(); @@ -1085,7 +1087,7 @@ GBool GFXOutputDev::beginType3Char(GfxState *state, double x, double y, double d msg(" Invalid charid %d for font %s", charid, current_font_id); return gFalse; } - gfxcolor_t col={128,0,0,0}; + gfxcolor_t col={0,0,0,0}; CharCode glyphid = current_fontinfo->glyphs[charid]->glyphid; device->drawchar(device, current_gfxfont, glyphid, &col, &m); } @@ -1547,6 +1549,9 @@ void GFXOutputDev::updateFont(GfxState *state) } this->current_fontinfo = this->info->getFont(id); + if(!this->current_fontinfo) { + msg(" Internal Error: no fontinfo for font %s\n", id); + } if(!this->current_fontinfo->seen) { dumpFontInfo("", gfxFont); } @@ -1554,7 +1559,8 @@ void GFXOutputDev::updateFont(GfxState *state) gfxfont_t*font = gfxfontlist_findfont(this->gfxfontlist,id); if(!font) { font = createGfxFont(gfxFont, current_fontinfo); - gfxfontlist_addfont(this->gfxfontlist, font); + font->id = strdup(id); + this->gfxfontlist = gfxfontlist_addfont(this->gfxfontlist, font); device->addfont(device, font); } current_gfxfont = font;