diff options
author | Carl Worth <cworth@cworth.org> | 2007-04-10 17:12:51 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-04-11 01:18:08 -0700 |
commit | 4ce2b62bcea49eccc0a4ee3781a115e4a34d3ad4 (patch) | |
tree | a0e5094aa4136bfa7beefa6c4108e00ab39d6f0f /src/cairo-win32-font.c | |
parent | fd8c1e4dc851dd4ce8f84a3e47abdc4906c83b0f (diff) |
_cairo_scaled_font_init: Detect an invalid matrix and return an error.
Also fix all callers to notice and propagate the error, (though
some paths will still lose the CAIRO_STATUS_INVALID_MATRIX value
due to a return value of NULL at one point).
Diffstat (limited to 'src/cairo-win32-font.c')
-rw-r--r-- | src/cairo-win32-font.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c index 82e3bfcf8..e1f263b67 100644 --- a/src/cairo-win32-font.c +++ b/src/cairo-win32-font.c @@ -283,11 +283,13 @@ _win32_scaled_font_create (LOGFONTW *logfont, cairo_matrix_multiply (&scale, font_matrix, ctm); _compute_transform (f, &scale); - _cairo_scaled_font_init (&f->base, font_face, - font_matrix, ctm, options, - &cairo_win32_scaled_font_backend); + status = _cairo_scaled_font_init (&f->base, font_face, + font_matrix, ctm, options, + &cairo_win32_scaled_font_backend); + + if (status == CAIRO_STATUS_SUCCESS) + status = _cairo_win32_scaled_font_set_metrics (f); - status = _cairo_win32_scaled_font_set_metrics (f); if (status) { cairo_scaled_font_destroy (&f->base); return NULL; |