-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A way to explicitly prefer OpenType shaping over AAT #4108
Comments
Changing |
I’d think it would prefer AAT tables, but I’m not sure if it should be all or none (i.e. if |
Here is another case where this is needed. This seems to be an official Moroccan font, it contains non-functional |
Regardless of the issue here, I don’t know if we can find a heuristic to detect such broken |
Reading this issue again, I probably opened it precisely about this font since this is not the first time I encounter it, though I can’t remember or find where I saw it before. |
After reviewing AALMAGHRIBI’s 'morx' table, I think there is a bug in HarfBuzz’s AAT implementation. This font does not enable its topographical subtables’ subfeatures in its |
I don’t know anything about |
According to the Apple font feature registry at https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html: Cursive Connection
The Cursive Connection feature type is used for cursively-connected scripts. It is required for Arabic, but may be used for other scripts as well.
(emphasis added). So if the font fails to set this in its |
You’re right: I just tried the font in Pages, and the cursive connection does work but only when explicitly enabled. So a heuristic could be that if an Arabic font’s 'morx' doesn’t enable cursive by default, HarfBuzz should fall back to OpenType. |
Currently we use some heuristics to decide whether to use AAT or OT layout table when fonts provide both and our heuristics try to match what CoreText does. All good. However, some fonts have AAT tables for historical reasons (since OSX initially didn’t support OT layout) and on non-mac platforms people were getting OT layout, now they get AAT and it can be unexpected (sometimes the AAT table are even there by accident, FontForge sometimes ”translates” OT to AAT and does it badly).
So, I’m asking for a way to always prefer OT. Currently our
ot
shaper does both OT and AAT layout, so changing shaper list order does not help.One way, though probably will be ugly internally, is to introduce and new dummy
aat
shaper that simply prefers AAT, and may be makeot
do the reverse and add a newdefault
(or some other name) that is equivalent to currentot
shaper (which is misnomer already).Or may be some other way, I don’t really mind, though shaper list is an already existing mechanism and some clients already expose it to users (I know at least luaotfload and SILE).
The text was updated successfully, but these errors were encountered: