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

masters or intermediate layers can also be marked as "alternate" #983

Open
anthrotype opened this issue Feb 12, 2024 · 3 comments
Open

masters or intermediate layers can also be marked as "alternate" #983

anthrotype opened this issue Feb 12, 2024 · 3 comments

Comments

@anthrotype
Copy link
Member

I just found out about this, which is a bit surprising to me at least:

https://handbook.glyphsapp.com/switching-shapes

A master layer can also be designated as an Alternate layer. For that, Control-click or right-click a master layer in the Layers palette and choose Alternate. Configure the axis range of the master layer like a normal Alternate layer.
Then, add a new layer to the master, mark it as an Alternate layer, and leave both the min and max fields empty. This renames the new layer to []. Place the alternate outline on the master layer and the normal outline on the [] layer. Whether the master or a backup layer is converted to an Alternate layer is not relevant to the exported fonts; it is purely an organizational choice within Glyphs.

glyphsLib doesn't currently support this situation because it assumes master layers are one thing, alternate or bracket layers another (the latter are handled separately and at a later stage in the builder).

I just file this issue for reference, but I don't plan to work on this. The code handling bracket layers is already complicated enough, and don't see much use in this. If Glyphs.app doesn't care (see "it is purely an organizational choice") then if one does care about building with glyphsLib/fontmake then they can reorganise the layers as glyphsLib expects, i.e. by avoiding to designate master layers as alternate/bracket.

@anthrotype anthrotype changed the title master layers can also be marked as "alternate" masters or intermediate layers can also be marked as "alternate" Feb 12, 2024
@anthrotype
Copy link
Member Author

anthrotype commented Feb 12, 2024

Turns out intermediate ("brace") layers can also be marked as alternate ("bracket") layers:

A layer can be both an Intermediate and Alternate layer. In that case, both the square bracket Alternate name ([…]) and the curly brace Intermediate name ({…}) are displayed in the Layers palette. Double-click either one to edit its settings.

but glyphsLib doesn't currently support that either as far as I can tell.
I get errors like:

KeyError: "glyph named 'idotless.BRACKET.varAlt01' already exists"

This one seems to be legitimate use case and we may want to fix/add support for.

@schriftgestalt
Copy link
Collaborator

schriftgestalt commented Mar 6, 2024

The Glyphs 3 handles that already. At least on the GSLayer side.

@schriftgestalt
Copy link
Collaborator

I use bracket on master layer quite often. That way you see the switched shape in the font view (e.g. the dollar without the full bars) for the bolder masters. It looks like this in the layer panel:
Bildschirmfoto 2024-03-07 um 11 33 27

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