X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Ffilters%2Fremove_font_transforms.c;h=95db4ca73fab1cd2b937c865e4e49504cec88264;hb=fdd99ebecfef4874ea12bc97839fa027a0e8ed2f;hp=2c7b1e5c30708969c410d43676bb443c94992d96;hpb=b9e9d6ddd0438ec3e2ce30e88629f80da0d224ed;p=swftools.git diff --git a/lib/filters/remove_font_transforms.c b/lib/filters/remove_font_transforms.c index 2c7b1e5..95db4ca 100644 --- a/lib/filters/remove_font_transforms.c +++ b/lib/filters/remove_font_transforms.c @@ -212,6 +212,9 @@ static gfxresult_t* pass1_finish(gfxfilter_t*f, gfxdevice_t*out) fd->dx = -total.xmin; fd->dy = 0; + font->ascent = total.ymax; + font->descent = total.ymin; + for(t=0;tglyphs[t].line; while(line) { @@ -227,6 +230,12 @@ static gfxresult_t* pass1_finish(gfxfilter_t*f, gfxdevice_t*out) return out->finish(out); } +static void pass2_addfont(gfxfilter_t*f, gfxfont_t*font, gfxdevice_t*out) +{ + /* we throw away original fonts, and do the addfont() for the transformed + fonts in the first drawchar() */ +} + static void pass2_drawchar(gfxfilter_t*f, gfxfont_t*font, int glyphnr, gfxcolor_t*color, gfxmatrix_t*matrix, gfxdevice_t*out) { internal_t*i = (internal_t*)f->internal; @@ -260,6 +269,7 @@ void gfxtwopassfilter_remove_font_transforms_init(gfxtwopassfilter_t*f) f->pass1.internal = i; f->pass2.name = "remove font transforms pass 2"; + f->pass2.addfont = pass2_addfont; f->pass2.drawchar = pass2_drawchar; f->pass2.internal = i;