[poppler] poppler/Form.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Apr 30 08:38:43 UTC 2023
poppler/Form.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 0864da5b1063c3ddba7e68a567cc56ed3474f8b2
Author: Albert Astals Cid <aacid at kde.org>
Date: Sun Apr 30 10:28:40 2023 +0200
Don't include an empty space at the end of the font name if there's no style
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));
More information about the poppler
mailing list