summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2015-05-21 22:37:06 +0930
committerAdrian Johnson <ajohnson@redneon.com>2015-05-21 22:40:01 +0930
commitd1dda5eeb218d22c79eb82714f5d7c9869f70260 (patch)
treea5d2f0d40eb718f2ae6242f4d9a7ca89109cfc3a
parentf52f0e2feb1ad0a4de23c475a8c020d41a1764a8 (diff)
cff: ensure glyph widths are positive when font matrix yy is negative
Bug 90538
-rw-r--r--src/cairo-cff-subset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-cff-subset.c b/src/cairo-cff-subset.c
index f15deb5ea..3ffe6f663 100644
--- a/src/cairo-cff-subset.c
+++ b/src/cairo-cff-subset.c
@@ -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