I’m trying to get the variable font axes from a font master. .weightValue and .widthValue are easy, but how to get custom ones? .customValue somehow only works as it just returns the first custom one. According to the help on font master I see there are only 4 specific custom values: .customValue, .customValue1, .customValue2, & .customValue3
And then there is .customValueForKey_ but when I inject the axis name as the argument, I get None. I want to access it by it’s name if possible (because I cannot know how many custom axes are there.)
The .customValueForKey_ is to get the value of a custom parameter with that name. The customValue part has nothing to do with the interpolation settings. That is poor wording on my part.
Thank you, guys. What if I got more axes than .customValue3 covers. I see there is no .customValue4 and I said, for what I’m about to do, I can’t predict the amount of axes.
Edit:
Georg explained it to me in person. No open questions so far Thanks!
@Mark@GeorgSeifert I’d be interested to know how to do this as well. I’m writing a script which generates masters on the fly and would like to both add new axes to the Font via my script as well change the master axis values. I will end up with several axes.
So it is basically like Georg and Rainer explained. What is not mentioned here but Georg told me is, that there are currently 6 axes possible. that’s why .customValue stop here at .customvalue3
That will bring some severe (to the good) changes I need to make in the Variable Font Preview plugin. But I’ll wait a bit, since you implemented it just recently.
Will it support more than 6 axes then? So far I limited to 6 for now.
I have recently been trying to access the custom values on the latter 3 axes, but keep getting this error: AttributeError: 'GSInstance' object has no attribute 'customValue1'
Is this something that can be resolved by modifying the setup of the file or using a custom parameter? For reference I have gotten the same error in both the standard Glyphs App 2.5.1 and the Cutting Edge Version 2.5.2 (1163)