Bug 163213 - Font Features dialog should not show OpenType features if the font has “morx” table
Summary: Font Features dialog should not show OpenType features if the font has “morx”...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium minor
Assignee: Julien Nabet
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: Character-Dialog
  Show dependency treegraph
 
Reported: 2024-09-30 11:19 UTC by ⁨خالد حسني⁩
Modified: 2024-09-30 20:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ⁨خالد حسني⁩ 2024-09-30 11:19:28 UTC
This split from bug 160634.

When a font has a “morx” table, HarfBuzz will use it for glyph substitution, so if the font has also “GSUB” table it will not be used.

Font Features dialog will list the “GSUB” features in the font, but they will have no effect which is misleading, so it should not list such features.

attachment 193636 [details] (from bug 160634) has a font that has both “morx” and “GSUB” and can be used for testing.
Comment 1 Buovjaga 2024-09-30 11:20:45 UTC
-> NEW
Comment 2 Y. Kawara 2024-09-30 11:32:31 UTC Comment hidden (off-topic)
Comment 3 Y. Kawara 2024-09-30 11:36:48 UTC Comment hidden (off-topic)
Comment 4 Buovjaga 2024-09-30 11:47:32 UTC
Hey Y. Kawara, next time you change the status, I will ban you.
Comment 5 Y. Kawara 2024-09-30 11:56:12 UTC Comment hidden (off-topic)
Comment 6 V Stuart Foote 2024-09-30 12:32:35 UTC
Is there any real advantage to majority of LibreOffice users to have mixed AAT and OpenType features, even if complementary? Seems very much a corner case of interest only to those font designers making it a practice in their offerings.

The HarfBuzz community does not seem enthusiastic of mixing smart type features, one or the other is fine--but not in combination. So why would we for an office suite.

Suppressing OTF feature when an AAT feature takes precedence seems reasonable, especially if the OTF feature is disabled as implemented in HarfBuzz libs.

If HarfBuzz moves the mark, sure. Until then just suppress the feature on the LibreOffice Character dialog.

+1
Comment 7 Julien Nabet 2024-09-30 17:56:47 UTC
I gave it a try here:
https://gerrit.libreoffice.org/c/core/+/174294
Comment 8 Commit Notification 2024-09-30 20:33:04 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0679a5cee16ae96c0d11e7d4fc1e59fb0f9cc591

tdf#163213: do not show OpenType features if the font has "morx" table

It will be available in 25.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Julien Nabet 2024-09-30 20:34:08 UTC
I'm not sure it worths it to cherry-pick this on 24.8 but if someone thinks it does, don't hesitate to cherry-pick it! :-)
Comment 10 Julien Nabet 2024-09-30 20:39:56 UTC
Y. Kawara: I think I understand your point of view. The patch may be reverted quite quickly (since I put the tdf in comment and it's only a 2 lines patch) if Harfbuzz changes about this point.
I'm not an expert about fonts but I suppose first step would be to discuss again about this with Harfbuzz community and then propose them a patch.

Let's put this one to FIXED.