X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=lib%2Ffilters%2Fremove_font_transforms.c;h=06e80316069e30ac1bb1f3380f73494f255e11ae;hb=4f2366641015f517c0e4f841b7ae6a9b90c7b184;hp=c92816c47ec56816f914af6445d7ec595e175180;hpb=61d532661dfc369cffa7b2c6cbf046f2d0d4ad29;p=swftools.git diff --git a/lib/filters/remove_font_transforms.c b/lib/filters/remove_font_transforms.c index c92816c..06e8031 100644 --- a/lib/filters/remove_font_transforms.c +++ b/lib/filters/remove_font_transforms.c @@ -138,6 +138,11 @@ static transformedfont_t* transformedfont_new(gfxfont_t*orig, mymatrix_t*m) f->orig = orig; f->matrix = *m; f->used = malloc(sizeof(f->used[0])*orig->num_glyphs); + int t; + for(t=0;tnum_glyphs;t++) { + if(orig->glyphs[t].unicode==32) + f->used[t]=1; //always preserve the space char in fonts + } return f; } @@ -212,7 +217,7 @@ static gfxresult_t* pass1_finish(gfxfilter_t*f, gfxdevice_t*out) fd->dx = -total.xmin; font->ascent = total.ymax; - font->descent = total.ymin; + font->descent = -total.ymin; for(t=0;tglyphs[t].line;