Bracket layers in variable fonts? Bracket + brace?

On my oslash (ø) glyph, I am currently using brace layers. I want to switch to an alternate glyph (where ø loses the center part of the slash) starting at the bold weight. Because I use these brace layers, and I don’t think it’s possible to have both braces and brackets, I was thinking to use the Rename Glyphs parameter. This would work well on my instances, however, I am curious if this would work on a GX variable font?

No, it doesn’t because you need a point in the design space beyond which it is supposed to kick in. An instance attribute does not suffice in this case because it leaves open the question: where does it start, where does it end?

The current implementation allows for either Bracket or Brace layers, but not both in the same glyph. You could do a couple of Bracket layers that retract the slash quickly between two coordinates in the design space.

1 Like

It is a multi-axis font so a bracket layer alone isn’t possible. I guess I can try doing something similar with a brace layer – two slashes that shrink between say {700,400} and {701,400} for example…

Yeah, three brace layers did the trick (one for each width in the design space, each of those that looks like one stoke is just two overlapping). Still have a lot of work to do on the design itself but this looks like it it’s functioning correctly, thanks @mekkablue!

1 Like

What you need the brace layers for? Just just bracket layers.

I think he means to make more adjustments than just the gap.

@mekkablue is correct. But I couldn’t use bracket layers even if I wanted to because my font has two axes, weight and width - I thought bracket layers only work if you have one axis?

They should also work with more axes now, but it gets pretty complicated occasionally.

Hi! I’m trying to generate a variable font with two master and one axis but if use a bracket layer I get this message when exporting.

Can't convert to compatible TrueType curves.
Glyph 'a' is not compatible.

Any help? Thanks!

You need two bracket layers. Or you need to explain the setup in more detail. Could you send the file?

I am having an issue exporting bracket layers to a variable font in Glyphs 2.5.1

For Thorn I want to cut off the right two serifs after a certain weight (see image). The top two are compatible and the bottom two are compatible:

My setup was to have the top two on their respective master layers and the bottom two on bracket layers at [130]. While this does in fact export the design successfully, it is not switching out when tested in FontView and on the web.

I got it to work as expected by including compatible bracket layers on all others master, but I am not sure why this is necessary.

You need compatible bracket layers in all masters because under the hood, Glyphs creates a whole new glyph that needs to have all masters. And then the glyphs are switched.

1 Like

That makes sense, thanks!

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:
  • Duplicate file and add bracket layers to all glyphs that use a component whose referenced glyph uses a bracket setup (I use this script: 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