X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpdf%2FGFXOutputDev.cc;h=2b0e8928719e05c4de07948a72a6751b198a7c8b;hp=def11a62d8617bf14851db440908a4b5d2b52234;hb=cdcf434411b35bb57bc3de9dffa6314d6ac70d5f;hpb=0ac72a559b20eaae037928bca1e26ae10b067101 diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index def11a6..2b0e892 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -579,6 +579,7 @@ GFXOutputDev::GFXOutputDev(InfoOutputDev*info, PDFDoc*doc) this->user_clipy1 = 0; this->user_clipx2 = 0; this->user_clipy2 = 0; + this->current_fontinfo = 0; this->current_text_stroke = 0; this->current_text_clip = 0; this->outer_clip_box = 0; @@ -762,6 +763,13 @@ static void dumpFontInfo(const char*loglevel, GfxFont*font) void dump_outline(gfxline_t*line) { + /*gfxbbox_t*r = gfxline_isrectangle(line); + if(!r) + printf("is not a rectangle\n"); + else + printf("is a rectangle: (%f,%f)-(%f-%f)\n", r->xmin, r->ymin, r->xmax, r->ymax); + */ + while(line) { if(line->type == gfx_moveTo) { msg(" | moveTo %.2f %.2f", line->x,line->y); @@ -1882,6 +1890,7 @@ void GFXOutputDev::updateFont(GfxState *state) } this->current_fontinfo = this->info->getFont(id); + if(!this->current_fontinfo) { msg(" Internal Error: no fontinfo for font %s", id); return; @@ -1890,7 +1899,7 @@ void GFXOutputDev::updateFont(GfxState *state) dumpFontInfo("", gfxFont); } - current_gfxfont = this->current_fontinfo->gfxfont; + current_gfxfont = this->current_fontinfo->getGfxFont(); device->addfont(device, current_gfxfont); free(id);