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

UFO default layer with custom name #664

Merged
merged 8 commits into from
Feb 26, 2021

Conversation

moyogo
Copy link
Collaborator

@moyogo moyogo commented Feb 23, 2021

The layer name public.default indicates that the default layer has no user defined name.
glyphsLib should store the user defined default layer name and round-trip it to UFOs.

The layer lib is now stored in the master userData instead of the font userData.
When several UFOs each have a layer with the same name, their lib may be different and cannot be stored in the font userData under the same key.

This now uses master.userData["com.schriftgestaltung.Glyphs.layerLib.<layer.name>"]["com.schriftgestaltung.Glyphs.layerName"], one per layer, instead of font.userData["com.schriftgestaltung.Glyphs.layerLib.<layer.name>"]["com.schriftgestaltung.Glyphs.layerName"], one for all layers with the same name across UFOs.

@anthrotype anthrotype requested review from madig and belluzj February 25, 2021 15:43
@belluzj
Copy link
Collaborator

belluzj commented Feb 26, 2021

I was going to comment that along with updating where the UFO layer lib is stored on the Glyphs side, we should also update my diagram that explains that: https://github.com/googlefonts/glyphsLib/blob/main/tests/builder/lib_and_user_data.png

But actually my diagram seems to already be describing the new situation, so I must have implemented my own diagram wrong when I was working on this? 🙄

@madig
Copy link
Collaborator

madig commented Feb 26, 2021

Does this in any way interact with Glyphs.app layer/master names? I remember newer G2 versions letting you set the master name. Does this transport into UFo or is it a separate thing?

@moyogo
Copy link
Collaborator Author

moyogo commented Feb 26, 2021

Does this in any way interact with Glyphs.app layer/master names? I remember newer G2 versions letting you set the master name. Does this transport into UFo or is it a separate thing?

I'm not able to rename the master default layer (through the UI or the API), it just uses the name of the master.

@moyogo moyogo force-pushed the default-layer-with-custom-name branch from 3172b4e to c3ede61 Compare February 26, 2021 12:49
@schriftgestalt
Copy link
Collaborator

Master layers are not supposed to have its own name. If a files happens to have one anyway, you can ignore it. Keeping the name around is less important in Glyphs 3 files as the important information moved to layer.attributs.

@moyogo moyogo merged commit 528a4a5 into googlefonts:main Feb 26, 2021
@moyogo moyogo deleted the default-layer-with-custom-name branch February 26, 2021 20:49
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.

5 participants