summaryrefslogtreecommitdiff
path: root/src/cairo-pdf-surface-private.h
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2023-01-22 15:55:06 +1030
committerAdrian Johnson <ajohnson@redneon.com>2023-01-29 18:08:42 +1030
commit79501baaa19f90954af0dda5910396375d21845e (patch)
treeacf1d1ceabb7db7900b9e12673aac1f96f17b10f /src/cairo-pdf-surface-private.h
parent47a932bffc16323b58e3c8f9bc3fe0d821838a84 (diff)
downloadcairo-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-pdf-surface-private.h')
-rw-r--r--src/cairo-pdf-surface-private.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cairo-pdf-surface-private.h b/src/cairo-pdf-surface-private.h
index 0781d9c53..c97affe6b 100644
--- a/src/cairo-pdf-surface-private.h
+++ b/src/cairo-pdf-surface-private.h
@@ -258,6 +258,13 @@ typedef struct _cairo_pdf_interchange {
} cairo_pdf_interchange_t;
+typedef struct _cairo_pdf_color_glyph {
+ cairo_hash_entry_t base;
+ cairo_scaled_font_t *scaled_font;
+ unsigned long glyph_index;
+ cairo_bool_t supported;
+} cairo_pdf_color_glyph_t;
+
/* pdf surface data */
typedef struct _cairo_pdf_surface cairo_pdf_surface_t;
@@ -288,6 +295,7 @@ struct _cairo_pdf_surface {
cairo_array_t knockout_group;
cairo_array_t jbig2_global;
cairo_array_t page_heights;
+ cairo_hash_table_t *color_glyphs;
cairo_scaled_font_subsets_t *font_subsets;
cairo_array_t fonts;
@@ -335,11 +343,13 @@ struct _cairo_pdf_surface {
cairo_pdf_operators_t pdf_operators;
cairo_paginated_mode_t paginated_mode;
+ cairo_bool_t type3_replay;
cairo_bool_t select_pattern_gstate_saved;
cairo_bool_t force_fallbacks;
cairo_operator_t current_operator;
+ cairo_bool_t reset_gs_required;
cairo_bool_t current_pattern_is_solid_color;
cairo_bool_t current_color_is_stroke;
double current_color_red;