From d4cf0b1c8dcdef31644879d6fbae11002828b927 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 13 Feb 2022 13:19:45 -0600 Subject: wip: Add an api to select palettes for color glyphs This commit adds a light-background attribute that can be used to influence which palette will be used to render COLRv0 layered glyphs with color fonts that have multiple palettes. This needs a way for cairo to invalidate its glyph cache when the selected palette changes, which needs new freetype api. --- pango/pango-attributes.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pango/pango-attributes.h') diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h index 69ff9e52..964e594a 100644 --- a/pango/pango-attributes.h +++ b/pango/pango-attributes.h @@ -129,6 +129,7 @@ typedef enum PANGO_ATTR_SENTENCE, /* PangoAttrInt */ PANGO_ATTR_BASELINE_SHIFT, /* PangoAttrSize */ PANGO_ATTR_FONT_SCALE, /* PangoAttrInt */ + PANGO_ATTR_LIGHT_BACKGROUND, /* PangoAttrInt */ } PangoAttrType; /** @@ -609,6 +610,8 @@ PANGO_AVAILABLE_IN_1_50 PangoAttribute * pango_attr_line_height_new_absolute (int height); PANGO_AVAILABLE_IN_1_50 PangoAttribute * pango_attr_text_transform_new (PangoTextTransform transform); +PANGO_AVAILABLE_IN_1_50 +PangoAttribute * pango_attr_light_background_new (gboolean light_background); PANGO_AVAILABLE_IN_1_50 PangoAttrString * pango_attribute_as_string (PangoAttribute *attr); -- cgit v1.2.1