diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2022-06-17 21:54:30 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2022-06-26 09:54:15 +0930 |
commit | 6bd549e8df66cc450b40cf26ef56f0ae5d8f37de (patch) | |
tree | b8f6be1c386f0ccee1b2f2abcaa75d78475cdd63 /src/cairo.h | |
parent | f408ae9269c9e45dcf48b9b2e466dee4b3b2771e (diff) | |
download | cairo-6bd549e8df66cc450b40cf26ef56f0ae5d8f37de.tar.gz |
Add color mode option
Diffstat (limited to 'src/cairo.h')
-rw-r--r-- | src/cairo.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/cairo.h b/src/cairo.h index aec16eaed..82e2c69d8 100644 --- a/src/cairo.h +++ b/src/cairo.h @@ -1370,6 +1370,29 @@ typedef enum _cairo_hint_metrics { } cairo_hint_metrics_t; /** + * cairo_color_mode_t: + * @CAIRO_COLOR_MODE_DEFAULT: Use the default color mode for + * font backend and target device, since 1.18. + * @CAIRO_COLOR_MODE_NO_COLOR: Disable rendering color glyphs. Glyphs are + * always rendered as outline glyphs, since 1.18. + * @CAIRO_COLOR_MODE_COLOR: Enable rendering color glyphs. If the font + * contains a color presentation for a glyph, and when supported by + * the font backend, the glyph will be rendered in color, since 1.18. + * + * Specifies if color fonts are to be rendered using the the color + * glyphs or outline glyphs. Glyphs that do not have a color + * presentation, and non-color fonts are not affected by this font + * option. + * + * Since: 1.18 + **/ +typedef enum _cairo_color_mode { + CAIRO_COLOR_MODE_DEFAULT, + CAIRO_COLOR_MODE_NO_COLOR, + CAIRO_COLOR_MODE_COLOR +} cairo_color_mode_t; + +/** * cairo_font_options_t: * * An opaque structure holding all options that are used when @@ -1448,6 +1471,13 @@ cairo_font_options_set_variations (cairo_font_options_t *options, #define CAIRO_COLOR_PALETTE_DEFAULT 0 +cairo_public void +cairo_font_options_set_color_mode (cairo_font_options_t *options, + cairo_color_mode_t color_mode); + +cairo_public cairo_color_mode_t +cairo_font_options_get_color_mode (const cairo_font_options_t *options); + cairo_public unsigned int cairo_font_options_get_color_palette (const cairo_font_options_t *options); |