Poppler shows a glyph when it should not
@mkasik
Submitted by Marek Kasik Assigned to poppler-bugs
Link to original bug (#106898)
Description
Cairo backend shows a glyph when rendering a text using Type3 font even if there is no glyph for current char code. This was reported to me downstream here together with reproducer:
https://bugzilla.redhat.com/show_bug.cgi?id=1589594
The PDF seems wrong because it does not have glyph for space in its Type3 font.
Looking at the code, the codeToGID table of CairoFont is initialized with zeros and only existing glyphs get a valid index. I propose to initialize the table with -1s and propagate this information through getGlyph() so the CairoOutputDev::drawChar() can check whether the index was actually set.