poppler/CairoFontEngine.cc | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit b96437128742e87a7603fa2a4d74baeda8368fba Author: Marcel Fabian Krüger <[email protected]> Date: Thu Jul 21 23:47:39 2022 +0200 Support Type3 charprocs having Resources in Cairo In !955 the same was done for OutputDevs with interpretType3Chars()=true, this adds similar handling to CairoFontEngine. diff --git a/poppler/CairoFontEngine.cc b/poppler/CairoFontEngine.cc index 061aa62b..a7cce588 100644 --- a/poppler/CairoFontEngine.cc +++ b/poppler/CairoFontEngine.cc @@ -484,7 +484,17 @@ static cairo_status_t _render_type3_glyph(cairo_scaled_font_t *scaled_font, unsi output_dev->startType3Render(gfx->getState(), gfx->getXRef()); output_dev->setInType3Char(true); charProc = charProcs->getVal(glyph); + if (!charProc.isStream()) { + return CAIRO_STATUS_USER_FONT_ERROR; + } + Object charProcResObject = charProc.streamGetDict()->lookup("Resources"); + if (charProcResObject.isDict()) { + gfx->pushResources(charProcResObject.getDict()); + } gfx->display(&charProc); + if (charProcResObject.isDict()) { + gfx->popResources(); + } output_dev->getType3GlyphWidth(&wx, &wy); cairo_matrix_transform_distance(&matrix, &wx, &wy);
