googlefonts/ufo2ft

Instantiator should swap glyphs across all layers

Closed this issue · 2 comments

The function

def swap_glyph_names(font: Any, name_old: str, name_new: str):
only works on the default layer, leaving sparse intermediate layers in a Designspace untreated. Instead of just running on all layers, it should pick out those that are referenced in the Designspace.

are you sure? swap_glyph_names is only ever called inside generate_instance method on a new Font object that was created from scratch and holds the interpolated UFO data. This Font only contains one layer, the default one.
Are you trying to use this swap_glyph_names from some other place?

Oh, duh, yes, I was using it in a different way.