summaryrefslogtreecommitdiff
path: root/src/cairo-scaled-font.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2022-04-22 21:18:09 +0930
committerAdrian Johnson <ajohnson@redneon.com>2022-04-25 17:08:07 +0930
commit4815949d2fd9053c5550de71c2f296005a4aa22d (patch)
treeeb76515c991892c65fc0c326b3e0d16620a67bca /src/cairo-scaled-font.c
parentcdcb67ef87790ab01c4f32a432f6bd47df0434e5 (diff)
downloadcairo-4815949d2fd9053c5550de71c2f296005a4aa22d.tar.gz
Fix the scaled_glyph_init color glyph logic
and split _cairo_user_scaled_glyph_init() into multiple functions. Update user-font test to test changing foreground text color.
Diffstat (limited to 'src/cairo-scaled-font.c')
-rwxr-xr-xsrc/cairo-scaled-font.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 270f8ed34..203b6a10c 100755
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -3057,7 +3057,8 @@ _cairo_scaled_glyph_lookup (cairo_scaled_font_t *scaled_font,
need_info = info & ~scaled_glyph->has_info;
/* If this is not a color glyph, don't try loading the color surface again. */
- if ((need_info & CAIRO_SCALED_GLYPH_INFO_COLOR_SURFACE) && scaled_glyph->not_color_glyph)
+ if ((need_info & CAIRO_SCALED_GLYPH_INFO_COLOR_SURFACE) &&
+ scaled_glyph->color_glyph_set && !scaled_glyph->color_glyph)
return CAIRO_INT_STATUS_UNSUPPORTED;
/* If requesting a color surface for a glyph that has used the