I have a smart component called _smart.bar with a Width property that controls its width. I’d like to set different Width values for this component depending on the current location in the designspace.
For exemple:
(wght:50) sub A by _smart.bar(Width:100) A;
(wght:120) sub A by _smart.bar(Width:220) A;
(wght:200) sub A by _smart.bar(Width:400) A;
My current implementation works, but it requires creating tons of additional glyphs—basically duplicating the entire glyphset three times for init, medi, and fina positions. This approach isn’t scalable.
For statics I found a workaround, but for Variable Font it’s much more complicated.
Do you have any ideas ?
I’ve created the left and right sides of the circle as separate glyphs. I’ve also made multiple _bar glyphs, each with a fixed width (e.g., _bar200, _bar40)
Then I use substitution rules to assemble the complete circled glyph by combining the left side, connecting bars, and right side:
sub A by A _bar200 _bar200 _bar40;
Each static instance has different substitution rules with different bar width combinations