[cairo-commit] src/cairo-scaled-font.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Jan 24 21:38:37 PST 2008
src/cairo-scaled-font.c | 41 +++++++++++++++++++----------------------
1 file changed, 19 insertions(+), 22 deletions(-)
New commits:
commit 5dfe47a3f14ee8597395dc53ff57fd429e9804cd
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jan 25 00:35:11 2008 -0500
[cairo-scaled-font] Unbreak it after my recent commit
Sigh.
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index eba474c..47d2047 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -481,28 +481,25 @@ _cairo_scaled_font_init (cairo_scaled_font_t *scaled_font,
scaled_font->scale_inverse = scaled_font->scale;
status = cairo_matrix_invert (&scaled_font->scale_inverse);
- /* If the font scale matrix rank 0, just using an all-zero inverse matrix
- * makes everything work correctly. This make font size 0 work without
- * producing an error.
- *
- * FIXME: If the scale is rank 1, we still go into error mode. But then
- * again, that's what we doo everywhere in cairo.
- *
- * Also, the check for == 0. below may bee too harsh...
- */
- if (status &&
- scaled_font->scale.xx == 0. && scaled_font->scale.xy == 0. &&
- scaled_font->scale.yx == 0. && scaled_font->scale.yy == 0.)
- {
- cairo_matrix_init (&scaled_font->scale_inverse,
- 0, 0, 0, 0,
- -scaled_font->scale.x0,
- -scaled_font->scale.y0);
- }
- else
- {
- return status;
- }
+ if (status) {
+ /* If the font scale matrix is rank 0, just using an all-zero inverse matrix
+ * makes everything work correctly. This make font size 0 work without
+ * producing an error.
+ *
+ * FIXME: If the scale is rank 1, we still go into error mode. But then
+ * again, that's what we doo everywhere in cairo.
+ *
+ * Also, the check for == 0. below may bee too harsh...
+ */
+ if (scaled_font->scale.xx == 0. && scaled_font->scale.xy == 0. &&
+ scaled_font->scale.yx == 0. && scaled_font->scale.yy == 0.)
+ cairo_matrix_init (&scaled_font->scale_inverse,
+ 0, 0, 0, 0,
+ -scaled_font->scale.x0,
+ -scaled_font->scale.y0);
+ else
+ return status;
+ }
scaled_font->glyphs = _cairo_cache_create (_cairo_scaled_glyph_keys_equal,
_cairo_scaled_glyph_destroy,
More information about the cairo-commit
mailing list