Summary: | Alternate substitution feature does not work when AAT tables are present in font | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Y. Kawara <sutetecoaca> |
Component: | LibreOffice | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | REOPENED --- | ||
Severity: | normal | CC: | khaled, stephane.guillou |
Priority: | medium | ||
Version: | 24.2.2.2 release | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Attachments: |
Test font generated from Four.sfd, with "Mac" option turned on (affected by this bug).
Test font generated from Four_noAAT.sfd, with "Mac" option turned off (not affected by this bug). FontForge data for Four.ttf FontForge data for Four_noAAT.ttf TTX data for Four.ttf TTX data for Four_noAAT.ttf |
Description
Y. Kawara
2024-04-12 01:46:14 UTC
Created attachment 193636 [details]
Test font generated from Four.sfd, with "Mac" option turned on (affected by this bug).
Created attachment 193637 [details]
Test font generated from Four_noAAT.sfd, with "Mac" option turned off (not affected by this bug).
Created attachment 193638 [details]
FontForge data for Four.ttf
Created attachment 193639 [details]
FontForge data for Four_noAAT.ttf
Created attachment 193640 [details]
TTX data for Four.ttf
Created attachment 193641 [details]
TTX data for Four_noAAT.ttf
Two typos in my bug description: U+FE41(﹂) → U+FE42(﹂) Four_noAAT.ttf was generated from Four_noAAT.ttf ↓ Four_noAAT.ttf was generated from Four_noAAT.sfd Thanks for the detailed report. Khaled, I thought you might be able to grep this issue about 100 times quicker than me. What do you think? If the font has a morx table HarfBuzz will use it for glyph substitution and will not look at GSUB table at all, since the two tables are exclusive, you can use one or the other but not both at the same time (one belongs to Apple Advanced Typography shaping model, and the other to OpenType shaping model). So if the font has a morx table but the alternate substitution feature is in GSUB table then the alternate substitution feature will be considered missing and will not be applied since the GSUB table is not consulted at all. I suggest to not include AAT tables at all. Sorry, but it is a bug. The feature is available in the UI (shows there are 4 alternates) but does nothing. "So if the font has a morx table but the alternate substitution feature is in GSUB table then the alternate substitution feature will be considered missing and will not be applied since the GSUB table is not consulted at all." I think this is a good description of the bug, from where things can be worked on. It is not impossible to take a different approach. Again, it works fine in Inkscape. To the previous message I would like to stress that there is a good reason to both have ATT and GSUB tables, as not all features exist in both sets, as seen from the N/A features described there: https://fontforge.org/docs/techref/gposgsub.html#gposgsub-conversion In that sense, I think LibreOffice UI's (and Inkscape's) approach at reading tables and enabling features is correct. |