GSInstance.addAsMaster() generates wrong Axis Location custom parameter

Hello, I just noticed that the masters generated from instances with addAsMaster() have a wrong Axis Location custom parameter.

For example, I have the masters Light (AL wght=300) and Bold Extrabold (AL wght=800). I generate a new master Regular from the instance Regular (AL wght=400). The newly generated master will have the AL wght=300, not 400.

A fix for this would be very much appreciated, as handling the Axis Location cp via Python in scripts is quite tedious. Thank you!

Can you send me a sample font?

Sample Font.glyphs (11.3 KB)

I added the absolute bare bones; You can try the Instance As Master functionality for the Regular instance that I added. The newly added master will have the Axis Location of the Light master.

I partially fixed it. When you have an Axis Location in the instance, it is used now. But if you only have them in the masters, you get one from any of the masters and not an interpolated value.

Thank you. I got exactly that far in my own fix :smile:

Will this make it into 3.2?

It is in the latest 3.1.1 cutting edge.