Add Number Values by Script

is there a way to access “Number Values” parameter in each master via script?

Thank you.

Manage number values on the font level:

Access their values on a master level:

image

1 Like

I added it to the wrapper and the docu (both will be online soon).

1 Like

Thank you!

I’m trying to access value with this code :

font = Glyphs.font
master = font.selectedFontMaster
print(master.numberValueForName_("newNumber").value)

It return me

<native-selector value of <GSInfoValue 0x60000467d680> 0>

What I’m doing wrong ?

Add a () after the value, like this: numberValueForName_(“name”).value()

2 Likes

Which is the method to add a Number Value to Font ?
I tried all method with GSFont, but I didn’t succeed.

Number values are set on masters.

I also tried all GSFontMaster Method…

I see, the wrapper code is not yet in the latest shipping version.

Here is what you can do in the meantime:

someMaster.setNumberValueValue_forName_(15, 'SomeName')
1 Like