vcl/source/font/FeatureCollector.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0679a5cee16ae96c0d11e7d4fc1e59fb0f9cc591
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Mon Sep 30 19:55:46 2024 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Mon Sep 30 22:32:56 2024 +0200

    tdf#163213: do not show OpenType features if the font has "morx" table
    
    Change-Id: I589419f7ffe3db01848e711021c2efd1de07692b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174294
    Reviewed-by: خالد حسني <kha...@libreoffice.org>
    Tested-by: Jenkins

diff --git a/vcl/source/font/FeatureCollector.cxx 
b/vcl/source/font/FeatureCollector.cxx
index 3e8e2e76e8a5..767d8c39aa73 100644
--- a/vcl/source/font/FeatureCollector.cxx
+++ b/vcl/source/font/FeatureCollector.cxx
@@ -14,6 +14,7 @@
 #include <font/OpenTypeFeatureStrings.hrc>
 #include <svdata.hxx>
 
+#include <hb-aat.h>
 #include <hb-ot.h>
 #include <hb-graphite2.h>
 
@@ -195,7 +196,9 @@ bool FeatureCollector::collect()
     }
     else
     {
-        collectForTable(HB_OT_TAG_GSUB); // substitution
+        // tdf#163213: Font Features dialog should not show OpenType features 
if the font has "morx" table
+        if (!hb_aat_layout_has_substitution(m_pHbFace))
+            collectForTable(HB_OT_TAG_GSUB); // substitution
         collectForTable(HB_OT_TAG_GPOS); // positioning
         return true;
     }

Reply via email to