diff options
author | Keith Packard <keithp@keithp.com> | 2003-08-28 14:12:08 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2003-08-28 14:12:08 +0000 |
commit | 2ee2cfe14a446bc928d5a0945cc2a68657f8c825 (patch) | |
tree | 67ce6671e3b95c1cb4ef6064a6baedc432711214 | |
parent | 4d399b9aca39f60793957e581664a968f35aee5d (diff) |
font pixel size is always non-negative
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/cairo-font.c | 2 | ||||
-rw-r--r-- | src/cairo_font.c | 2 |
3 files changed, 5 insertions, 2 deletions
@@ -1,3 +1,6 @@ +2003-08-28 Keith Packard <keithp@keithp.com + * src/cairo_font.c: font pixel size is always non-negative + 2003-08-26 Carl Worth <cworth@isi.edu> * src/cairoint.h: Added missing underscores to several internal diff --git a/src/cairo-font.c b/src/cairo-font.c index 3b03c95c..e0c89722 100644 --- a/src/cairo-font.c +++ b/src/cairo-font.c @@ -143,7 +143,7 @@ _cairo_font_resolve_xft_font (cairo_font_t *font, cairo_gstate_t *gstate, XftFon X/Y scaling. Is there anything different we would want to do for non-uniform X/Y scaling? */ _cairo_matrix_compute_determinant (&matrix, &expansion); - font_size = sqrt (expansion); + font_size = sqrt (abs(expansion)); FcPatternAddDouble (pattern, "pixelsize", font_size); cairo_matrix_scale (&matrix, 1.0 / font_size, 1.0 / font_size); diff --git a/src/cairo_font.c b/src/cairo_font.c index 3b03c95c..e0c89722 100644 --- a/src/cairo_font.c +++ b/src/cairo_font.c @@ -143,7 +143,7 @@ _cairo_font_resolve_xft_font (cairo_font_t *font, cairo_gstate_t *gstate, XftFon X/Y scaling. Is there anything different we would want to do for non-uniform X/Y scaling? */ _cairo_matrix_compute_determinant (&matrix, &expansion); - font_size = sqrt (expansion); + font_size = sqrt (abs(expansion)); FcPatternAddDouble (pattern, "pixelsize", font_size); cairo_matrix_scale (&matrix, 1.0 / font_size, 1.0 / font_size); |