Add Axis in Brace Layer

The Roman is finished, now I want to design the Italic within the same file. So far, so good.

The Problem
I have a lot of Brace Layers with just one Axis, like {100}. For the Italic, I need to change this into {100, 0} in the Roman, while I need to have {100, 12} in the Italic.; eventually I will already add width axis, resulting in {100, 0, 100} and {100, 0, 0}.

Instead of a Double Click and entering all values by hand, is there a more efficient way? The Brace and Bracket Manager and the Find and Replace in Layer Names scripts don’t work.

Have a nice weekend!

This is easily doable with a script. Are you somewhat familiar with Python and the Glyphs API? Are you on Glyphs 2 or 3?

absolutely not :see_no_evil:

Are you on Glyphs 2 or 3?

Glyphs 3

Can you try the following code (paste it into the Macro Window and run the code)? It assumes your italic axis is the second axis in your font. Select the glyphs in the font view that you want to update the values on:

for selected_layer in Font.selectedLayers:
	for layer in selected_layer.parent.layers:
		if layer.isSpecialLayer:
			layer.attributes["coordinates"]["a02"] = Font.masters[layer.associatedMasterId].axes[1]

Make a backup of your file beforehand, of course.

perfect :slight_smile: Thank you very very much, that saved a lot of time and clicking :slight_smile: