I have glyphs with intermediate layers that I want to also use for smart components. But setting any smart component axis on the glyph zeros out the layer coordinates, and the UI for editing layer coordinates now edits the smart component axis. Is this exacted or is there some setting I’m missing?
There seems to be a conflict of global and local axis. Can you list your global and local(smart) axis?
Global axes:
{
axes = (
{
name = Kashida;
tag = KASH;
},
{
name = Spacing;
tag = SPAC;
},
{
hidden = 1;
name = "Lam Height";
tag = LAMH;
}
);
}
Local axis is created with:
font = Glyphs.font
for axis in font.axes:
if axis.axisTag == "LAMH":
break
axis_default = 700
axis_min = 600
axis_max = 780
names = []
for glyph in font.glyphs:
for layer in glyph.layers:
if coords := layer.attributes["coordinates"]:
if coords[axis.id] != axis_default:
names.append(glyph.name)
break
for name in names:
smart_axis = GSSmartComponentAxis()
smart_axis.name = "Lam"
smart_axis.topValue = axis_max
smart_axis.bottomValue = axis_min
glyph = font.glyphs[name]
glyph.smartComponentAxes = [smart_axis]
for layer in glyph.layers:
if coords := layer.attributes["coordinates"]:
if coords[axis.id] == axis_max:
layer.smartComponentPoleMapping[smart_axis.id] == 2
elif coords[axis.id] == axis_min:
layer.smartComponentPoleMapping[smart_axis.id] == 1
Brace layers should not get a smartComponentPoleMapping, They just need the right coordinate setting. And in smart components, the coordinates only allow the local axis. I’m thinking about improving on this.