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

[markFeatureWriter] skip ignorable anchors #510

Closed
wants to merge 3 commits into from

Conversation

moyogo
Copy link
Collaborator

@moyogo moyogo commented Jun 30, 2021

Glyphs.app doesn't export anchors with names starting with "#" or "_#".

See also #477

@khaledhosny
Copy link
Collaborator

khaledhosny commented Jul 1, 2021

Shouldn’t this be handled somehow by glyphsLib? I don’t think ufo2ft imposing arbitrary Glyphs conventions on any UFO file. May be ufo2ft should have some this-is-a-UFO-converted-from-Glyphs-file flag to apply this and other Glyphs-specific conventions.

@moyogo
Copy link
Collaborator Author

moyogo commented Jul 2, 2021

Shouldn’t this be handled somehow by glyphsLib? I don’t think ufo2ft imposing arbitrary Glyphs conventions on any UFO file.

We can either add an anchor objectLib key to not export a specific anchor or a font.lib key to not export anchors matching a no-export list.

May be ufo2ft should have some this-is-a-UFO-converted-from-Glyphs-file flag to apply this and other Glyphs-specific conventions.

That could work a well.

I'm not sure what to do.
@anthrotype @madig any thoughts?

@anthrotype
Copy link
Member

it may be arbitrary and Glyphs.app-only, but it's convenient, even in a UFO only workflow. ObjectLibs could work as well, but they are clumsy to use (is there a UI for them?).
I'm leaning towards having this in.
How common do you think people name their anchors starting with # who do not want them to be ignorable and may be disrupted by this change? Very few, if any, I reckon.

@anthrotype
Copy link
Member

@moyogo perhaps we can add an ignorePrefix option to the MarkFeatureWriter and set that to # (via the UFO.lib featureWriters key) when glyphsLib exports UFOs from .glyphs sources? So we won't disrupt UFO-only workflow that may happen to be using # to not mean "skip this anchor from GPOS"

@khaledhosny
Copy link
Collaborator

I think this is better done in glyphsLib minimal mode now, and fontmake should start using it. This way, Glyphs-specific behavior is localized in glyphsLib.

@madig
Copy link
Collaborator

madig commented Feb 17, 2022

Skipping "#" is not enough, https://glyphsapp.com/learn/reusing-shapes-component-tricks#g-__repurposing-cursive-attachment-for-ligatures says you can use any non-letter character.

I think this is better done in glyphsLib minimal mode now, and fontmake should start using it. This way, Glyphs-specific behavior is localized in glyphsLib.

Mh, yeah, but then you still need something for compiling UFOs that contain these anchors, because you might keep them in your sources and compile from there. Maybe an opt-in filter would do the job.

@anthrotype
Copy link
Member

+1 for an opt-in filter, always turned on for glyphsLib-generated UFOs

@khaledhosny
Copy link
Collaborator

glyphsLib now has its own mark feature writer, so this should be done there now.

@khaledhosny
Copy link
Collaborator

googlefonts/glyphsLib#964

This PR should either be closed or changed to fix anchor names that are invalid for feature files (instead of skipping them silently, which is a Glyphs thing) or even just error.

@khaledhosny
Copy link
Collaborator

Fixed in #869

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