[cairo-commit] 2 commits - src/win32

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun May 8 18:03:27 UTC 2022


 src/win32/cairo-dwrite-font.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a0e7e472c856bb6926019b855cbb974a842bdefe
Merge: 455a4cca5 7c037e525
Author: Uli Schlachter <psychon at znc.in>
Date:   Sun May 8 18:03:25 2022 +0000

    Merge branch 'dwrite-svg-fix' into 'master'
    
    dwrite: Fix incorrect rendering of some SVG fonts
    
    See merge request cairo/cairo!322

commit 7c037e5254466ca743ec9079609fddc6df62cb88
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Sun May 8 20:28:41 2022 +0930

    dwrite: Fix incorrect rendering of some SVG fonts
    
    SVG fonts are returning DWRITE_GLYPH_IMAGE_FORMATS_NONE as well
    as DWRITE_GLYPH_IMAGE_FORMATS_SVG in GetCurrentRun() resulting in the
    outline glyph and color glyph both rendered to the same glyph image.

diff --git a/src/win32/cairo-dwrite-font.cpp b/src/win32/cairo-dwrite-font.cpp
index 0a3b77362..edac72c5f 100644
--- a/src/win32/cairo-dwrite-font.cpp
+++ b/src/win32/cairo-dwrite-font.cpp
@@ -1035,7 +1035,6 @@ _cairo_dwrite_scaled_font_init_glyph_color_surface(cairo_dwrite_scaled_font_t *s
 	    case DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE:
 	    case DWRITE_GLYPH_IMAGE_FORMATS_CFF:
 	    case DWRITE_GLYPH_IMAGE_FORMATS_COLR:
-	    default:
 		/* Outline glyphs */
 		if (color_run->paletteIndex == 0xFFFF) {
 		    D2D1_COLOR_F color = foreground_color_brush->GetColor();
@@ -1050,6 +1049,8 @@ _cairo_dwrite_scaled_font_init_glyph_color_surface(cairo_dwrite_scaled_font_t *s
 				  color_run->glyphRunDescription,
 				  color_brush,
 				  DWRITE_MEASURING_MODE_NATURAL);
+	    case DWRITE_GLYPH_IMAGE_FORMATS_NONE:
+		break;
 	}
     }
 


More information about the cairo-commit mailing list