vcl/source/gdi/pdfwriter_impl.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 4e5032fe8ae6e2d9e59eebb8708b004b5cf3136b
Author:     Khaled Hosny <kha...@aliftype.com>
AuthorDate: Sat Dec 10 01:24:51 2022 +0200
Commit:     خالد حسني <kha...@aliftype.com>
CommitDate: Sat Dec 10 10:07:38 2022 +0000

    vcl: Add /Name key to Type 3 font dictionary
    
    Even though the spec says it is deprecated and Acrobat ignores it,
    several tools including Acrobat readers won’t show font name for Type 3
    fonts unless there is one in the font dictionary.
    
    Change-Id: I8e65a1cf1d89744e9d89542d3540c7f3ba938369
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143903
    Tested-by: Jenkins
    Reviewed-by: خالد حسني <kha...@aliftype.com>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 8de89e4128e3..f4a3145c5085 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -2486,9 +2486,10 @@ bool PDFWriterImpl::emitType3Font(const 
vcl::font::PhysicalFontFace* pFace,
         OStringBuffer aLine(1024);
         aLine.append(nFontObject);
         aLine.append(" 0 obj\n"
-                     "<</Type/Font/Subtype/Type3\n");
+                     "<</Type/Font/Subtype/Type3/Name/");
+        appendName(aSubsetInfo.m_aPSName, aLine);
 
-        aLine.append("/FontBBox[");
+        aLine.append("\n/FontBBox[");
         // note: Top and Bottom are reversed in VCL and PDF rectangles
         aLine.append(OString::number(aSubsetInfo.m_aFontBBox.Left()));
         aLine.append(' ');

Reply via email to