diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2023-01-22 15:55:06 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2023-01-29 18:08:42 +1030 |
commit | 79501baaa19f90954af0dda5910396375d21845e (patch) | |
tree | acf1d1ceabb7db7900b9e12673aac1f96f17b10f /src/cairo-user-font.c | |
parent | 47a932bffc16323b58e3c8f9bc3fe0d821838a84 (diff) | |
download | cairo-79501baaa19f90954af0dda5910396375d21845e.tar.gz |
PDF Type 3 color fonts
This implements Type 3 color fonts for PDF for any font with a
CAIRO_SCALED_GLYPH_INFO_RECORDING_SURFACE. This includes user-fonts,
SVG fonts, and COLR fonts.
Glyphs with foreground colors are not yet implemented as Type 3 glyphs
and will be rendered as images by cairo-surface.
Diffstat (limited to 'src/cairo-user-font.c')
-rw-r--r-- | src/cairo-user-font.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-user-font.c b/src/cairo-user-font.c index e7a1d0211..ee11d864c 100644 --- a/src/cairo-user-font.c +++ b/src/cairo-user-font.c @@ -183,7 +183,9 @@ _cairo_user_scaled_glyph_init_record_glyph (cairo_user_scaled_font_t *scaled_fon } else { status = CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED; - if (face->scaled_font_methods.render_color_glyph) { + if (face->scaled_font_methods.render_color_glyph && + scaled_font->base.options.color_mode != CAIRO_COLOR_MODE_NO_COLOR) + { recording_surface = _cairo_user_scaled_font_create_recording_surface (scaled_font, TRUE, foreground_color); cr = _cairo_user_scaled_font_create_recording_context (scaled_font, recording_surface, TRUE); |