summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2023-04-30 10:28:40 +0200
committerAlbert Astals Cid <aacid@kde.org>2023-04-30 10:32:43 +0200
commit0864da5b1063c3ddba7e68a567cc56ed3474f8b2 (patch)
tree647d52223bb450ba649a60e463698106fa142cba
parent2b437604157a34546f7340cc383d7cfaa292ede5 (diff)
Don't include an empty space at the end of the font name if there's no style
-rw-r--r--poppler/Form.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/poppler/Form.cc b/poppler/Form.cc
index 85e0e66b..e63a4852 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -2763,7 +2763,7 @@ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath,
return {};
}
- const std::string fontFamilyAndStyle = fontFamily + " " + fontStyle;
+ const std::string fontFamilyAndStyle = fontStyle.empty() ? fontFamily : fontFamily + " " + fontStyle;
XRef *xref = doc->getXRef();
Object fontDict(new Dict(xref));