summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2022-05-08 20:28:41 +0930
committerAdrian Johnson <ajohnson@redneon.com>2022-05-08 20:28:41 +0930
commit7c037e5254466ca743ec9079609fddc6df62cb88 (patch)
treec0b70f723823c7fe1c9949ee89ddf7208076b150 /src/win32
parent455a4cca5472a309d036b6393f1db0dc4403d303 (diff)
downloadcairo-7c037e5254466ca743ec9079609fddc6df62cb88.tar.gz
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.
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/cairo-dwrite-font.cpp3
1 files changed, 2 insertions, 1 deletions
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;
}
}