From 5e73c107f5536852154c23d7490b6a5e5d9d5967 Mon Sep 17 00:00:00 2001 From: Fujii Hironori Date: Tue, 10 Jan 2023 16:01:20 +0900 Subject: [PATCH] Don't leave a font face in an error state after a scaled font creation failure Scaled font creation may fail if the font size is very large on win32. But, don't leave the font face in an error state in such case. Fixes cairo/cairo#607 --- src/cairo-scaled-font.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index a1728def3..83f1e1eed 100755 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -1176,9 +1176,7 @@ cairo_scaled_font_create (cairo_font_face_t *font_face, status = font_face->backend->scaled_font_create (font_face, font_matrix, ctm, options, &scaled_font); - /* Did we leave the backend in an error state? */ if (unlikely (status)) { - status = _cairo_font_face_set_error (font_face, status); _cairo_scaled_font_map_unlock (); if (font_face != original_font_face) cairo_font_face_destroy (font_face);