Hey Glyphs friends,
I’m learing more about scripting & OpenType features and, while this question probably has a very simple answer, I’m wondering how to use the GPOS feature in a contextual format using classes.
Practically, I have a class @num for all my numbers and @brackets for all bracket related gyphs. In the context of a @num followed by a @bracket pairing (or the reverse), I want to apply a: pos @bracket <0 50 0 0>; effect to shift the glyph up 50 units. Eventually, I plan to swap the y value for a custom Number Value per master, but just want to get the feature working first.
Currently, I have: pos @num @brackets’ <0 50 0 0>; placed in my calt feature but with no success.
How is this code best written and in which feature category would it go, calt for contextual alternates? Or somewhere else?
As a scripting beginner the concept makes sense, it’s just the order/placement of the code that I’m stuck on.