https://bugs.documentfoundation.org/show_bug.cgi?id=160634
Bug ID: 160634
Summary: Alternate substitution feature does not work when AAT
tables are present in font
Product: LibreOffice
Version: 24.2.2.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: LibreOffice
Assignee: [email protected]
Reporter: [email protected]
Alternate substitution from OpenType (OT) GSUB table does not work when Adobe
Advance Typography (AAT)'s morx and feat tables are present.
It is available in the font features, but it does not work.
It works fine in Inkscape.
For your information, AAT does not have an alternate substitution feature.
AAT and OT have different features, some overlapping, some not, sometimes with
some degree of difference.
Font making software like FontForge allows font makers to include both sets of
features for better support across platforms, and leaves it up to software to
pick up features from any set.
It seems LibreOffice is getting confused with this, but since AAT does not have
an alternate subsitution feature, it should really not look into AAT...
For copyright reasons I cannot provide the original font that spurred this bug
report, but I have prepared a special font named "Four" as a test case.
I am attaching two versions. In both of these versions, there is a total of 7
characters:
・U+0034 (4)
・U+300C(「)
・U+300D(」)
・U+56DB (四)
・U+FE41(﹁)
・U+FE41(﹂)
・an alternate version of U+0034, encoded at the very end of the font, that
displays as "four"
In both versions, alternate substitution feature works as follows:
・U+0034 (4) provides two alternates:
・alternate version of U+0034
・U+56DB (四)
As explained above, AAT does not have an alternate substitution feature, so
vertical substitution feature (very normal for Japanese fonts) has been added
to make FontForge add AAT tables. Vertical substitution is available from both
OT and AAT. This should not be considered when testing, but I include it for
clarity:
・U+300C(「) gets replaced by U+FE41(﹁)
・U+300D(」) gets replaced by U+FE41(﹂)
Four.ttf was generated from Four.sfd, with "Mac" option turned on, as a result,
AAT tables were added from the presentence of a vertical subsitution feature.
Four_noAAT.ttf was generated from Four_noAAT.ttf, with "Mac" option turned off.
As a result, no AAT table was added.
Expected result (can be checked with Four_noAAT):
In the font dialog select font, and click "feature" next to the language box.
There is an "Access all alternates" dropdown menu, that allows to select any of
the substitutions. Two substitutions are available.
Even without applying, you can see that the substitution will work.
Actual result (can be checked with Four):
In the font dialog select font, and click "feature" next to the language box.
There is an "Access all alternates" dropdown menu, that allows to select any of
the substitutions. Two substitutions are available.
The subsitution does nothing.
Alternate substitution should work in both Four_noAAT and Four.
I am also including the original FontForge files, as well as ttx-uncompressed
table data.
P.S.: Vertical subsitution works regardless of presence or not of AAT.
P.S.: FontForge has got good documentation about difference between AAT and OT:
https://fontforge.org/docs/techref/gposgsub.html#gposgsub-conversion
--
You are receiving this mail because:
You are the assignee for the bug.