Swapping letters for trial fonts

I want to make trial fonts by swapping some basic Latin characters with similar accented characters.

For instance, at the export stage, I want to take A and swap it with Å, or Á, or Ą. Take C and swap with any based on C character—Ç or Ć. And so on.

So the word ACUTE will turn into ÅÇUTE with this trial font.

I suspect it can be achieved with simple glyph renaming, right?

How to do it technically? Can I set up it via ‘Rename Glyphs’ custom parameter? Or can I use fonttools and postprocess exported ttfs/otfs?

Yes. Does it not work for you?

It works, but not in the way I’d like it to work.

Since A is used as a component in all accented characters, like Â, Ã and so on, this substitution in Rename Glyphs


leads to the next result:

Which is understandable. But it’s not what I want to achieve.

I’d prefer glyphs that weren’t swapped to stay the same.

You only need one line of those two.

Oh, thank you. Anyway, the result is the same.

You can try a “GlyphsFilterDecompose” filter that includes all the glyphs that shouldn’t change.

Does this look correct?

That looks good. You might need to use a “PreFilter” if the filter is applied after the rename glyph parameter.

Hmm, something is still wrong.


The result is the same:

There is better solution (specifically for that purpose): the “Decompose Glyphs” parameter.

Yay! It works!

I actually tried Decompose Glyphs parameter before the filter, and got no result.

It started to work only after a listed all the glyphs that use A as component.

Thank you very very much! :raised_hands: