cff: ensure glyph widths are positive when font matrix yy is negative

Bug 90538
This commit is contained in:
Adrian Johnson 2015-05-21 22:37:06 +09:30
parent f52f0e2feb
commit d1dda5eeb2

View file

@ -1163,8 +1163,8 @@ cairo_cff_font_read_font_metrics (cairo_cff_font_t *font, cairo_hash_table_t *t
if (p < end)
p = decode_number (p, &yy);
}
/* Freetype uses 1/yy to get units per EM */
font->units_per_em = _cairo_round(1.0/yy);
/* Freetype uses 1/abs(yy) to get units per EM */
font->units_per_em = _cairo_round(1.0/fabs(yy));
}
static cairo_int_status_t