svx/source/svdraw/svdpdf.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit de1ec46e5635da58a45dba6b1ef47a0d89822e82
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Sep 30 15:18:25 2025 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Oct 2 16:58:04 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]>

diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index d74eca134088..93584b4b6d15 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -1403,6 +1403,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));
     }

Reply via email to