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

cursFeatureWriter: Support multiple entry/exit anchor pairs #863

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

khaledhosny
Copy link
Collaborator

Support dot suffixed entry and exit anchor names, in addition to unsuffixed names. Each anchor pair creates a new lookups. Lookups are sorted by anchor names.

Support dot suffixed entry and exit anchor names, in addition to
unsuffixed names. Each anchor pair creates a new lookups. Lookups are
sorted by anchor names.
@khaledhosny
Copy link
Collaborator Author

Glyphs supports such suffixed cursive anchor names, but I don’t know about other font editors, so in a sense this is Glyphs-specific, but UFO spec is silent on cursive anchors so I think the whole concept is Glyphs-specific.

@schriftgestalt, this supports entry.1, entry.foo etc, does glyph support suffix seperators other than .?

@anthrotype
Copy link
Member

Thanks Khaled, even if only Glyphs.app supports this, I think it's OK to add this here.

@khaledhosny khaledhosny merged commit 92a7023 into main Aug 6, 2024
9 checks passed
@khaledhosny khaledhosny deleted the multiple-cursive-anchors branch August 6, 2024 15:29
@schriftgestalt
Copy link

schriftgestalt commented Aug 6, 2024

I just check my code. All anchors that start with "exit/entry" a used for the curs feature. Everything following is used as suffix. So "exitABC" or "entry1234" is valid.

Glyphs uses "exit/entry" that have one char (e.g. # or 😀) prefix for component alignment but ignores them for the curs feature.

@khaledhosny
Copy link
Collaborator Author

I just check my code. All anchors that start with "exit/entry" a used for the curs feature. Everything following is used as suffix. So "exitABC" or "entry1234" is valid.

Interesting. Since lookup for entry.1 is named curs_1, what happens if there is also entry_1 anchor?

Glyphs uses "exit/entry" that have one char (e.g. # or 😀) prefix for component alignment but ignores them for the curs feature.

I think we already skip such anchors in glyphsLib markFeatureWriter, and since they don’t start with entry or exit, they would be skipped here as well.

@schriftgestalt
Copy link

Interesting. Since lookup for entry.1 is named curs_1, what happens if there is also entry_1 anchor?

Those would end up in the same lookup.

Copy link
Collaborator

@moyogo moyogo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@moyogo
Copy link
Collaborator

moyogo commented Aug 7, 2024

Maybe Glyphs.app can use the "." like in the test with this semantics?

@schriftgestalt
Copy link

What do you mean? Use the period in the lookup name of only allow dot-suffixes?

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

Successfully merging this pull request may close these issues.

4 participants