diff --git a/src/cairo-font-options.c b/src/cairo-font-options.c index 4eac64da9..458f2c77d 100644 --- a/src/cairo-font-options.c +++ b/src/cairo-font-options.c @@ -830,3 +830,4 @@ cairo_font_options_get_custom_palette_color (cairo_font_options_t *options, return CAIRO_STATUS_INVALID_INDEX; } +slim_hidden_def (cairo_font_options_get_custom_palette_color); diff --git a/src/cairoint.h b/src/cairoint.h index 65bc16f53..bd97853d6 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -1971,6 +1971,7 @@ slim_hidden_proto (cairo_font_face_get_user_data); slim_hidden_proto_no_warn (cairo_font_face_reference); slim_hidden_proto (cairo_font_face_set_user_data); slim_hidden_proto (cairo_font_options_equal); +slim_hidden_proto (cairo_font_options_get_custom_palette_color); slim_hidden_proto (cairo_font_options_hash); slim_hidden_proto (cairo_font_options_merge); slim_hidden_proto (cairo_font_options_set_antialias); diff --git a/src/win32/cairo-dwrite-font.cpp b/src/win32/cairo-dwrite-font.cpp index 764835bc8..e5e4efdb3 100644 --- a/src/win32/cairo-dwrite-font.cpp +++ b/src/win32/cairo-dwrite-font.cpp @@ -1036,7 +1036,16 @@ _cairo_dwrite_scaled_font_init_glyph_color_surface(cairo_dwrite_scaled_font_t *s color_brush->SetColor(&color); uses_foreground_color = TRUE; } else { - color_brush->SetColor(color_run->runColor); + double red, green, blue, alpha; + cairo_status_t status; + status = cairo_font_options_get_custom_palette_color (&scaled_font->base.options, + color_run->paletteIndex, + &red, &blue, &green, &alpha); + if (status == CAIRO_STATUS_SUCCESS) { + color_brush->SetColor(D2D1::ColorF(red, blue, green, alpha)); + } else { + color_brush->SetColor(color_run->runColor); + } } dc4->DrawGlyphRun(origin,