summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poppler/Form.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/poppler/Form.cc b/poppler/Form.cc
index 958ff3e1..1fa748dc 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -2999,6 +2999,10 @@ std::vector<Form::AddFontResult> Form::ensureFontsForAllCharacters(const GooStri
Unicode uChar = (unsigned char)(unicodeText->getChar(i)) << 8;
uChar += (unsigned char)(unicodeText->getChar(i + 1));
+ if (uChar < 128 && !std::isprint(static_cast<unsigned char>(uChar))) {
+ continue;
+ }
+
CharCode c;
bool addFont = false;
if (ccToUnicode->mapToCharCode(&uChar, &c, 1)) {