[cairo-commit] 2 commits - src/cairo-surface.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Aug 14 12:08:33 UTC 2021


 src/cairo-surface.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit d0a2031c5c8b85e0ea5481f8d4edf99deac3ae36
Merge: 48d606114 4e859ddb1
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sat Aug 14 12:08:32 2021 +0000

    Merge branch 'fix-color-glyph-compositing' into 'master'
    
    Fix compositing non-color glyphs in one case
    
    See merge request cairo/cairo!224

commit 4e859ddb19c5aa3a71986ab891d40539320a142f
Author: Matthias Clasen <mclasen at redhat.com>
Date:   Sun Aug 1 07:36:06 2021 -0400

    Fix compositing non-color glyphs in one case
    
    The intention here is: "if show_text_glyphs is unsupported,
    try show_gyphs". We need to make sure to set the status to
    unsupported before checking it, otherwise we end up looking
    at the status that was set by composite_color_glyphs if
    show_text_glyphs is NULL.
    
    This showed up in https://github.com/harfbuzz/harfbuzz/issues/2675

diff --git a/src/cairo-surface.c b/src/cairo-surface.c
index 45296fccd..32f54883c 100644
--- a/src/cairo-surface.c
+++ b/src/cairo-surface.c
@@ -2847,8 +2847,6 @@ _cairo_surface_show_text_glyphs (cairo_surface_t	    *surface,
     if (unlikely (status))
 	return status;
 
-    status = CAIRO_INT_STATUS_UNSUPPORTED;
-
     if (_cairo_scaled_font_has_color_glyphs (scaled_font)) {
         utf8_copy = malloc (sizeof (char) * utf8_len);
         memcpy (utf8_copy, utf8, sizeof (char) * utf8_len);
@@ -2874,6 +2872,7 @@ _cairo_surface_show_text_glyphs (cairo_surface_t	    *surface,
     /* The logic here is duplicated in _cairo_analysis_surface show_glyphs and
      * show_text_glyphs.  Keep in synch. */
     if (clusters) {
+        status = CAIRO_INT_STATUS_UNSUPPORTED;
 	/* A real show_text_glyphs call.  Try show_text_glyphs backend
 	 * method first */
 	if (surface->backend->show_text_glyphs != NULL) {


More information about the cairo-commit mailing list