{
double l1 = sqrt(in->m00 * in->m00 + in->m01 * in->m01);
double l2 = sqrt(in->m10 * in->m10 + in->m11 * in->m11);
- double l = l1+l2;
+ double l = (l1+l2)/2.0;
if(l < 1e-10) {
memset(out, 0, sizeof(*out));
return;
transformedfont_t*f = rfx_calloc(sizeof(transformedfont_t));
f->orig = orig;
f->matrix = *m;
- f->used = malloc(sizeof(f->used[0])*orig->num_glyphs);
+ f->used = rfx_calloc(sizeof(f->used[0])*orig->num_glyphs);
+ int t;
+ for(t=0;t<orig->num_glyphs;t++) {
+ if(orig->glyphs[t].unicode==32)
+ f->used[t]=1; //always preserve the space char in fonts
+ }
return f;
}
fd->dx = -total.xmin;
font->ascent = total.ymax;
- font->descent = total.ymin;
+ font->descent = -total.ymin;
for(t=0;t<count;t++) {
gfxline_t*line = font->glyphs[t].line;