svx/source/svdraw/svdpdf.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 994ff00b8809b2e3c9de306bec2af0fad1672375
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Oct 14 11:33:03 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Oct 15 13:44:37 2025 +0200

    use glyphTag field to determine if cid or names
    
    only Type 1 named fonts have name-keyed in srcFontType
    
    Change-Id: I30e22978ab57371e69f4efc591ec7c1a2d8399fd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192382
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Jenkins

diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 8a460791c085..69e196b2779f 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -1004,7 +1004,8 @@ static bool toPfaCID(SubSetInfo& rSubSetInfo, const 
OUString& fileUrl,
     OUString nameToCIDMapUrl = fileUrl + u".nametocidmap";
     OUString toMergedMapUrl = fileUrl + u".tomergedmap";
 
-    OString version, Notice, FullName, FamilyName, CIDFontName, 
CIDFontVersion, srcFontType;
+    OString version, Notice, FullName, FamilyName, CIDFontName, 
CIDFontVersion, srcFontType,
+        glyphTag;
     OString brokenFontName;
     FontName = postScriptName.toUtf8();
     std::map<sal_Int32, OString> glyphIndexToName;
@@ -1044,6 +1045,8 @@ static bool toPfaCID(SubSetInfo& rSubSetInfo, const 
OUString& fileUrl,
             continue;
         if (extractEntry(sLine, "sup.srcFontType", srcFontType))
             continue;
+        if (extractEntry(sLine, "## glyph[tag]", glyphTag))
+            continue;
         if (extractEntry(sLine, "FontName", FontName))
         {
             const bool bBrokenFontName = FontName != postScriptName.toUtf8();
@@ -1143,7 +1146,12 @@ static bool toPfaCID(SubSetInfo& rSubSetInfo, const 
OUString& fileUrl,
     cidFontInfo.WriteLine(Concat2View("Trademark       (" + Trademark + ")"));
     cidFontInfo.Close();
 
-    bNameKeyed = srcFontType.endsWith("(name-keyed)");
+    /*
+      ## glyph[tag] {cid,iFD}
+      or
+      ## glyph[tag] {name,encoding}
+    */
+    bNameKeyed = glyphTag == "{name,encoding}";
 
     if (bNameKeyed)
     {

Reply via email to