svx/source/svdraw/svdpdf.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
New commits: commit 603af3b275bee769716d22fe2b47743bb60a60f1 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Oct 14 11:33:03 2025 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Tue Oct 14 16:11:57 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/+/192386 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index f13569384fde..cb53cdfb8c4a 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -1001,7 +1001,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; @@ -1041,6 +1042,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(); @@ -1146,7 +1149,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) {
