sd/qa/unit/export-tests.cxx  |    4 ++--
 svx/source/svdraw/svdpdf.cxx |   13 +++++--------
 2 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit 49e9cd83908c69f293115723f8b738e4416666fd
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Sep 25 17:54:44 2025 +0100
Commit:     Miklos Vajna <[email protected]>
CommitDate: Mon Sep 29 13:40:12 2025 +0200

    make extracted ligatures non-discretionary
    
    If they appear in the cmaps then they are used and we want them, so
    assume they are liga instead of dlig.
    
    Change-Id: Ic044cc4c98385a52849e64b081f0af8d60249858
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191514
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 26736ee61c47..7c167a18839e 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -1084,7 +1084,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfFont)
         CPPUNIT_ASSERT_EQUAL(u"normal"_ustr, sItalic);
         // check that the others remain as expected
         OUString sFontName = getXPath(pXml, "//font[2]", "name");
-        CPPUNIT_ASSERT_EQUAL(u"Liberation Serif:dlig"_ustr, sFontName);
+        CPPUNIT_ASSERT_EQUAL(u"Liberation Serif"_ustr, sFontName);
         sal_Int32 nFontHeight = getXPath(pXml, "//font[2]", 
"height").toInt32();
         CPPUNIT_ASSERT_EQUAL(494, nFontHeight);
     }
@@ -1094,7 +1094,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfFont)
         CPPUNIT_ASSERT_EQUAL(u"bold"_ustr, sWeight);
         // check that the others remain as expected
         OUString sFontName = getXPath(pXml, "//font[4]", "name");
-        CPPUNIT_ASSERT_EQUAL(u"Liberation Sans:dlig"_ustr, sFontName);
+        CPPUNIT_ASSERT_EQUAL(u"Liberation Sans"_ustr, sFontName);
         sal_Int32 nFontHeight = getXPath(pXml, "//font[4]", 
"height").toInt32();
         CPPUNIT_ASSERT_EQUAL(564, nFontHeight);
     }
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 197d6791a570..ebbf241a1cba 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -1217,7 +1217,7 @@ static void buildCMapAndFeatures(const OUString& CMapUrl, 
const OUString& Featur
 
         SvFileStream Features(FeaturesUrl, StreamMode::READWRITE | 
StreamMode::TRUNC);
         Features.WriteLine("languagesystem DFLT dflt;");
-        Features.WriteLine("feature dlig {");
+        Features.WriteLine("feature liga {");
         for (const auto& ligature : ligatureGlyphToChars)
         {
             sal_Int32 nLigatureGlyph = ligature.first;
@@ -1232,7 +1232,7 @@ static void buildCMapAndFeatures(const OUString& CMapUrl, 
const OUString& Featur
             ligatureLine += " by \" + OString::number(nLigatureGlyph) + ";";
             Features.WriteLine(ligatureLine);
         }
-        Features.WriteLine("} dlig;");
+        Features.WriteLine("} liga;");
         Features.Close();
 
         bFeatures = true;
@@ -1358,7 +1358,7 @@ static EmbeddedFontInfo mergeFontSubsets(const OUString& 
mergedFontUrl,
     {
         SvFileStream Features(mergedFeaturesUrl, StreamMode::READWRITE | 
StreamMode::TRUNC);
         Features.WriteLine("languagesystem DFLT dflt;");
-        Features.WriteLine("feature dlig {");
+        Features.WriteLine("feature liga {");
         for (const auto& ligature : ligatureGlyphToChars)
         {
             sal_Int32 nLigatureGlyph = ligature.first;
@@ -1373,7 +1373,7 @@ static EmbeddedFontInfo mergeFontSubsets(const OUString& 
mergedFontUrl,
             ligatureLine += " by \" + OString::number(nLigatureGlyph) + ";";
             Features.WriteLine(ligatureLine);
         }
-        Features.WriteLine("} dlig;");
+        Features.WriteLine("} liga;");
         Features.Close();
     }
 
@@ -1484,10 +1484,7 @@ void 
ImpSdrPdfImport::ImportText(std::unique_ptr<vcl::pdf::PDFiumPageObject> con
     aFnt.SetFontSize(aFontSize);
 
     if (!sFontName.isEmpty())
-    {
-        //TODO: any way to know if we need to force discretionally ligatures
-        aFnt.SetFamilyName(sFontName + ":dlig");
-    }
+        aFnt.SetFamilyName(sFontName);
 
     const int italicAngle = pPageObject->getFontAngle();
     aFnt.SetItalic(italicAngle == 0 ? ITALIC_NONE

Reply via email to