How can I update the glyph preview in the font window’s automatically using a script

Hello,

How can I update the glyph preview in the font window’s automatically using a script, instead of having to do it manually (after a script make changes)?

If it is possible.

TIA

What did you do to trigger the change in component placement?

I create the glyphs, add the components within them, and finally set the anchor. However, all of this is done automatically by a script executed in the background by the LLM (Codex or Claude).

Since it’s a script, the window doesn’t refresh the last change, likely the anchor. Is there a command to trigger an update on the preview? If so, I can add it as the final directive to the tools that execute the code.

T.

You can trigger an update by running this code:

glyph.willChangeValueForKey_("changeCount")
glyph.didChangeValueForKey_("changeCount")

were glyph is the GSGlyph object hoes cell you like to update.

1 Like

thank you