diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2023-09-25 10:27:10 +0000 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2023-09-25 10:27:10 +0000 |
commit | 991470945f8f09b4a675e45df1223110eac1a9d8 (patch) | |
tree | f9763069ea923c4f9c772a46b674123f3b275379 | |
parent | 60dc1dd072565f0999519ead607f2b4e93feb8b5 (diff) |
cairo: update type 3 fonts for cairo 1.18 api
-rw-r--r-- | poppler/CairoFontEngine.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc index 1c06be03..b6dbdb95 100644 --- a/poppler/CairoFontEngine.cc +++ b/poppler/CairoFontEngine.cc @@ -473,6 +473,10 @@ static cairo_status_t _render_type3_glyph(cairo_scaled_font_t *scaled_font, unsi cairo_matrix_multiply(&matrix, &matrix, &invert_y_axis); cairo_transform(cr, &matrix); +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 18, 0) + cairo_set_source(cr, cairo_user_scaled_font_get_foreground_marker(scaled_font)); +#endif + CairoOutputDev *output_dev = info->outputDev; output_dev->setCairo(cr); @@ -522,7 +526,7 @@ static cairo_status_t _render_type3_glyph(cairo_scaled_font_t *scaled_font, unsi return status; } -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 17, 6) +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 18, 0) static cairo_status_t _render_type3_color_glyph(cairo_scaled_font_t *scaled_font, unsigned long glyph, cairo_t *cr, cairo_text_extents_t *metrics) { return _render_type3_glyph(scaled_font, glyph, cr, metrics, true); @@ -544,7 +548,7 @@ CairoType3Font *CairoType3Font::create(const std::shared_ptr<GfxFont> &gfxFont, Ref ref = *gfxFont->getID(); cairo_font_face_t *font_face = cairo_user_font_face_create(); cairo_user_font_face_set_init_func(font_face, _init_type3_glyph); -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 17, 6) +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 18, 0) // When both callbacks are set, Cairo will call the color glyph // callback first. If that returns NOT_IMPLEMENTED, Cairo will // then call the non-color glyph callback. |