From: miklosh Date: Sat, 17 Nov 2007 23:36:31 +0000 (+0000) Subject: Merged from Poppler's Gfx.cc; Unset the font if it doesn't exist or we can not load... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6cd998411e6e0c083aba9cc885b55efa05cf9c18;p=inkscape.git Merged from Poppler's Gfx.cc; Unset the font if it doesn't exist or we can not load it properly --- diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp index 5bf7e0fe7..f8e21ab17 100644 --- a/src/extension/internal/pdfinput/pdf-parser.cpp +++ b/src/extension/internal/pdfinput/pdf-parser.cpp @@ -2014,6 +2014,10 @@ void PdfParser::opSetFont(Object args[], int numArgs) { GfxFont *font; if (!(font = res->lookupFont(args[0].getName()))) { + // unsetting the font (drawing no text) is better than using the + // previous one and drawing random glyphs from it + state->setFont(NULL, args[1].getNum()); + fontChanged = gTrue; return; } if (printCommands) {