[cairo-commit] 2 commits - src/cairo-scaled-font.c src/cairo-script-surface.c src/cairo-surface.c src/win32

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jan 19 21:19:43 UTC 2023


 src/cairo-scaled-font.c         |    1 +
 src/cairo-script-surface.c      |    1 +
 src/cairo-surface.c             |    1 +
 src/win32/cairo-dwrite-font.cpp |    1 +
 4 files changed, 4 insertions(+)

New commits:
commit 45a1317aa42bba6f74def0be960b95342ac3ec92
Merge: 7b1de369d 8fbfb7f37
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Jan 19 21:19:41 2023 +0000

    Merge branch 'scaled-font-options' into 'master'
    
    [scaled-font] Clean up font-options before copy
    
    See merge request cairo/cairo!415

commit 8fbfb7f3770c42ad050c2b7ac77dd345e6b5eeab
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Jan 19 11:39:36 2023 -0700

    [scaled-font] Clean up font-options before copy

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 83f1e1eed..cc52ed577 100755
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -3073,6 +3073,7 @@ cairo_scaled_font_get_font_options (cairo_scaled_font_t		*scaled_font,
 	return;
     }
 
+    _cairo_font_options_fini (options);
     _cairo_font_options_init_copy (options, &scaled_font->options);
 }
 slim_hidden_def (cairo_scaled_font_get_font_options);
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c
index 2baf873de..058626321 100644
--- a/src/cairo-script-surface.c
+++ b/src/cairo-script-surface.c
@@ -3044,6 +3044,7 @@ _emit_scaled_font (cairo_script_surface_t *surface,
 	if (unlikely (status))
 	    return status;
 
+	_cairo_font_options_init_default (&options);
 	cairo_scaled_font_get_font_options (scaled_font, &options);
 	status = _emit_font_options (surface, &options);
 	if (unlikely (status))
diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index fd661221b..942e2025c 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2757,6 +2757,7 @@ composite_color_glyphs (cairo_surface_t             *surface,
 	font_face = cairo_scaled_font_get_font_face (scaled_font);
 	cairo_scaled_font_get_font_matrix (scaled_font, &font_matrix);
 	cairo_scaled_font_get_ctm (scaled_font, &ctm);
+	_cairo_font_options_init_default (&font_options);
 	cairo_scaled_font_get_font_options (scaled_font, &font_options);
 	cairo_matrix_scale (&ctm, x_scale, y_scale);
 	scaled_font = cairo_scaled_font_create (font_face,
diff --git a/src/win32/cairo-dwrite-font.cpp b/src/win32/cairo-dwrite-font.cpp
index 03f1668d3..764835bc8 100644
--- a/src/win32/cairo-dwrite-font.cpp
+++ b/src/win32/cairo-dwrite-font.cpp
@@ -1883,6 +1883,7 @@ _cairo_dwrite_scaled_font_create_win32_scaled_font (cairo_scaled_font_t *scaled_
     cairo_scaled_font_get_ctm (scaled_font, &ctm);
 
     cairo_font_options_t options;
+    _cairo_font_options_init_default (&options);
     cairo_scaled_font_get_font_options (scaled_font, &options);
 
     cairo_scaled_font_t *font = cairo_scaled_font_create (win32_face,


More information about the cairo-commit mailing list