Skip to content
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

AAT ligatures #17

Open
mikeday opened this issue Jul 30, 2021 · 1 comment
Open

AAT ligatures #17

mikeday opened this issue Jul 30, 2021 · 1 comment

Comments

@mikeday
Copy link

mikeday commented Jul 30, 2021

Hi I'm looking at how ligatures work in the AAT morx table and I note that in fontkit it pushes the ligature glyphs back onto the stack after generating them:

https://github.com/foliojs/fontkit/blob/417af0c79c5664271a07a783574ec7fac7ebad0c/src/aat/AATMorxProcessor.js#L209

This is necessary for the Zapfino font, where the "ffi" ligature is implemented by first generating an "ff" ligature and then using that followed by the "i" to generate the "ffi" ligature, however the second ligature action won't work unless the "ff" is on the stack.

It doesn't seem that swash does this at the moment, although I haven't been able to test it with the Zapfino font yet, is there a simple shaping test program I could try?

@dfrg
Copy link
Owner

dfrg commented Jul 30, 2021

That sounds like entirely reasonable behavior and it is very likely that the AAT code in swash is incorrect here. There's unfortunately nothing simple like hb-shape available yet. The code in the swash_demo repo can be modified to test various combinations of fonts and text runs.

I'll definitely be taking a look at this though. Thanks for bringing it up.

dfrg added a commit that referenced this issue Jul 30, 2021
* Push potentially intermediate ligatures back onto stack in ligature subtable
* Handle END_OF_TEXT in insertion subtable
* Correct advance count in insertion subtable
kirawi pushed a commit to kirawi/swash that referenced this issue Sep 7, 2021
* Push potentially intermediate ligatures back onto stack in ligature subtable
* Handle END_OF_TEXT in insertion subtable
* Correct advance count in insertion subtable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants