Bracket layers in variable fonts? Bracket + brace?

I am working on a variable font (vf) that uses bracket layers on multiple glyphs to switch between two different designs at different points in the design space; some of these glyphs are also used as components. I have not seen much documentation detailing the use and behavior of bracket layers when exporting to a vf especially when these glyphs are used as components. I am curious to see how others have been dealing with this and wanted to share my workflow for working with bracket layers in this context.


Current issues:

  • Component’s whose referenced glyph uses bracket layers does not respect bracket layers and design changes without having an identical bracket setup
  • Lack of documentation on the way that brackets and reverse brackets can be used in the same glyph
  • In order to export brackets with the current version of Glyphs, it is necessary to have one bracket layer per master layer, rather than just having the bracket layers relevant to the range of the alternate design

Workflow (for a single axis vf):

  • Set up master layers with the intended design at that point in the design space
  • Add necessary bracket and reverse bracket layers to accommodate the 2 designs (set numbers equal i.e. [134] and ]134] ) In my experience, masters less than or equal to the number in brackets take a bracket layer, and masters greater than that number take a reverse bracket layer.
  • Make sure for all bracket glyphs with 2 designs that there is a bracket layer for each master layer (I check with a script: https://github.com/mjlagattuta/Hepta-Slab/blob/master/sources/tools/Check-VF-Bracket-Layer-Setup.py)
  • Duplicate file and add bracket layers to all glyphs that use a component whose referenced glyph uses a bracket setup (I use this script: https://github.com/mjlagattuta/Hepta-Slab/blob/master/sources/tools/Add-VF-Bracket-Layers.py) Ideally this would happen at export time so that no duplicate file is needed
  • Export the font. If done correctly, glyphs and the instances should change at the same time. If glyphs with components do not have bracket layers Glyphs App will not throw any errors but the glyph will not switch out designs like the original glyph does.

I’m hoping there is an easier/better way to do this, but this is what has been working for me at the moment

2 Likes