summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSune Vuorela <sune@vuorela.dk>2023-05-16 15:29:04 +0200
committerSune Vuorela <sune@vuorela.dk>2023-05-17 09:49:47 +0200
commitdb6d86238a86116f4ef809d6fd19ed859c36b5c1 (patch)
treec92bf28b9d59684b6f5a8a3f86d4e199007a696a
parent6b70f3fc046cc0107ca3a1da0faa33e7bbb50255 (diff)
Lookup with same rules as inserting them
Inserting fonts happens without a trailing space if font style is empty. Apply teh same rules when lookin up.
-rw-r--r--poppler/Form.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/Form.cc b/poppler/Form.cc
index 1fa748dc..f3ddc056 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -2714,7 +2714,7 @@ std::string Form::findFontInDefaultResources(const std::string &fontFamily, cons
return {};
}
- const std::string fontFamilyAndStyle = fontFamily + " " + fontStyle;
+ const std::string fontFamilyAndStyle = fontStyle.empty() ? fontFamily : fontFamily + " " + fontStyle;
Object fontDictObj = resDict.dictLookup("Font");
assert(fontDictObj.isDict());