Replace Reference of Dynamic Glyph

Hi!

If my entire font is mostly based off of dynamic references to a few characters, say “O” for example, and I decide that I want to change those references to something like “A”, is there a quick / easy way to replace all references in one go, or do I manually have to go to each glyph and replace “O” with “A” one by one?

You can do that with a script.
And if you like to export different variations, you can add several instances with different “Rename Glyphs” parameters that switch the component on export.

Thanks! Where could I go to learn to create these scripts?

Nevermind, I see it requires knowledge of Python :slight_smile: I don’t suppose anyone’s already written a script for something like this, or is there perhaps somewhere I can go to find something like this?

What is a dynamic reference?

If you mean components, that script already exists.

And for the Replace Glyphs parameter you don’t need Python.

Yeah that’s what I mean. Where can I find that script (sorry if the questions are dumb, I’m still learning the software)

To clarify, by ‘Dynamic Reference’ I mean replacing all instances for LSB or RSB where reference to another glyph is used. So if 4 glyphs have LSB or RSB sizing linked to ‘H’ (= H + 5, for example), then I need a script that allows me to swap ‘H’ for another glyph, so that those 4 glyphs will be linked to a new Glyph, such as = L + 5, for example.

You mean Metrics Keys.

Okay sure, but where would I find a script for this?

For any other users who need it, I found it: https://github.com/mekkablue/Glyphs-Scripts/blob/master/Spacing/Find%20and%20Replace%20in%20Metrics%20Keys.py