Poppler shows a glyph when it should not
Submitted by Marek Kasik
Assigned to poppler-bugs
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:
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.