svx/source/svdraw/svdpdf.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit fb2069f817f6e2a8dc6536245b60c34bbb0a452d
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 30 15:18:25 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Oct 15 09:24:35 2025 +0200

    ignore font subsets with no glyphs
    
    Change-Id: I562581f9af5251fcd932ce688784b79655c1f599
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191687
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>
    (cherry picked from commit de1ec46e5635da58a45dba6b1ef47a0d89822e82)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192354
    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 53f4b3860f8c..cb8923a1e36a 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -1406,6 +1406,10 @@ static EmbeddedFontInfo mergeFontSubsets(const OUString& 
mergedFontUrl,
     std::vector<std::pair<OUString, OUString>> fonts;
     for (size_t i = 0; i < rSubSetInfo.aComponents.size(); ++i)
     {
+        // Ignore subsets with no glyphs in them, except for the first one
+        // which can have notdef in it
+        if (i && !rSubSetInfo.aComponents[i].nGlyphCount)
+            continue;
         
fonts.push_back(std::make_pair(rSubSetInfo.aComponents[i].toMergedMapUrl,
                                        rSubSetInfo.aComponents[i].pfaCIDUrl));
     }
commit ae210e6d138efcc4d0c42b471dd25617f75e4b2b
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 30 15:05:03 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Oct 15 09:24:20 2025 +0200

    mergefonts needs the notdef glyph in only one of the merged fonts
    
    afdko was happy to allow it in two input fonts, but disallows it
    for three or more, so only add the notdef glyph for the first font.
    
    Change-Id: I20bacf9873d78ab44d7cb8527c0ba5923fa98cf6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191686
    Reviewed-by: Miklos Vajna <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    (cherry picked from commit c61e1e43015344e82b0eabc42e9a9e563ea41383)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192353
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 9f83e31d9da1..53f4b3860f8c 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -1324,7 +1324,8 @@ static void buildCMapAndFeatures(const OUString& CMapUrl, 
const OUString& Featur
     const OUString& toMergedMapUrl = 
rSubSetInfo.aComponents.back().toMergedMapUrl;
     SvFileStream toMergedMap(toMergedMapUrl, StreamMode::READWRITE | 
StreamMode::TRUNC);
     toMergedMap.WriteLine(Concat2View("mergefonts "_ostr + FontName + " 
0"_ostr));
-    toMergedMap.WriteLine("0   0");
+    if (rSubSetInfo.aComponents.size() == 1)
+        toMergedMap.WriteLine("0       0");
     for (size_t i = 0; i < glyphs.size(); ++i)
     {
         OString sMapLine = OString::number(i + mergeOffset) + "        " + 
OString::number(glyphs[i]);

Reply via email to