Skip to content

cairo: preserve text color when drawing type 3 glyphs

Adrian Johnson requested to merge ajohnson/poppler:cairo-type3 into master

Type 3 glyphs (that don't override the color) should be painted with the current graphics state color when the text operator is invoked.

Here are a couple of test cases I created with cairo user-fonts to test this fix.

Draw a single type 3 glyph. Text color is green. The Type 3 glyph does not set the color. Without this fix CairoOuput draws the glyph all black.

user-font.pdf

Draw a single type 3 color glyph. Text color is green. The Type 3 glyph draws one rectangle in the default color and one rectangle in red. Without this fix CairoOuput draws the default color rectangle in black.

user-font-color.pdf

Edited by Adrian Johnson

Merge request reports