mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 16:08:20 +02:00
type1: fallback if the font matrix is not a uniform scale
https://bugs.launchpad.net/ubuntu/+source/cairo/+bug/1790242
This commit is contained in:
parent
ec70bde74a
commit
717f0e0a40
1 changed files with 5 additions and 0 deletions
|
|
@ -388,6 +388,11 @@ cairo_type1_font_subset_get_bbox (cairo_type1_font_subset_t *font)
|
|||
/* Freetype uses 1/yy to get units per EM */
|
||||
font->base.units_per_em = 1.0/yy;
|
||||
|
||||
/* If the FontMatrix is not a uniform scale the metrics we extract
|
||||
* from the font won't match what FreeType returns */
|
||||
if (xx != yy || yx != 0.0 || xy != 0.0)
|
||||
return CAIRO_INT_STATUS_UNSUPPORTED;
|
||||
|
||||
font->base.x_min = x_min / font->base.units_per_em;
|
||||
font->base.y_min = y_min / font->base.units_per_em;
|
||||
font->base.x_max = x_max / font->base.units_per_em;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue