summaryrefslogtreecommitdiff
path: root/src/cairo-win32-font.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-win32-font.c')
-rw-r--r--src/cairo-win32-font.c10
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;