I have a font which requires custom GlyphData.xml for a custom script.
(By the way, custom glyph definitions are super cool! This is my first time utilizing Glyph Info directly, and I don’t know how I didn’t know about it until just recently, or how I lived without it, often guessing at glyph naming or component requirements, etc. Anyway…)
My custom glyph definitions include anchors, including for a bunch of Mark glyphs.
I’m trying to “Set Anchors” for these custom Mark glyphs via a script, and it seems not to work.
The glyphs have -xx
in their name, to indicate their custom script.
I’m trying the following code, and it doesn’t seem to work as expected:
# for glyph in Glyphs
for glyph in Glyphs.font.glyphs:
if "-xx" in glyph.name and glyph.category == "Mark":
for layer in glyph.layers:
layer.addMissingAnchors()
However, using menu item Glyph > Set Anchors does work like a charm. Have a missed something in my Python script, or is this not currently possible?
Version: Glyphs 3.3.1 (Cutting Edge versions active)
Thanks for any insights!