Hello, I am trying to write a script that adds the Axis Mappings custom Parameter to my font with a specified set of values. I have tried everything under the sun, but when I run the script, the Axis Mappings parameter that is added is empty. When I run print(parameter) to list all parameters, it gives me <GSCustomParameter Axis Mappings: None>. My script is as follows:
for font in Glyphs.fonts:
font.customParameters["Axis Mappings"] = "{\
wght = {\
700 = 700;\
300 = 307;\
400 = 485;\
200 = 200;\
};"
What in the world am I doing wrong? I have tried numerous ways of leaving out the outermost brackets, shifting the indents around, lalala. Help. Please! Thank you
One way to find out is to create a custom parameter manually and then, in a quick script, ask for its value and for the type of the value with type(value).
When I paste the value content into my code, it doesn’t work. The syntax is quite different from the other custom parameters. Any clue as to how to write it correctly?
I’m afraid I don’t follow. I’m quite the layman when it comes to this. What do I need to do with this in order to write an Axis Mappings custom parameter?