Closed madig closed 6 months ago
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.
The function https://github.com/googlefonts/ufo2ft/blob/8e9e6eb66a2d22714c9da9544bdbfe1aa44d0cf0/Lib/ufo2ft/instantiator.py#L835 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.