[poppler] poppler/Form.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Apr 30 08:32:11 UTC 2023


 poppler/Form.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2b437604157a34546f7340cc383d7cfaa292ede5
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Apr 30 10:26:36 2023 +0200

    Do not hardcode Noto Sans as FontName

diff --git a/poppler/Form.cc b/poppler/Form.cc
index 67657a9a..85e0e66b 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -2813,7 +2813,7 @@ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath,
         {
             std::unique_ptr<Dict> fontDescriptor = std::make_unique<Dict>(xref);
             fontDescriptor->set("Type", Object(objName, "FontDescriptor"));
-            fontDescriptor->set("FontName", Object(objName, "Noto Sans"));
+            fontDescriptor->set("FontName", Object(objName, fontFamilyAndStyle.c_str()));
 
             // a bit arbirary but the Flags field is mandatory...
             const std::string lowerCaseFontFamily = GooString::toLowerCase(fontFamily);


More information about the poppler mailing list