vendorID on Python

Hello,
I wanted to add a vendorID value in this python script but i cannot find it.
If i add : font.vendorID= "RSZ"
I get this error:

 Traceback (most recent call last):
  File "AddRszFontInfo.py", line 18
    font.vendorID= "RSZ"
    ^^^^^^^^^^^^^
AttributeError: 'NSKVONotifying_GSFont' object has no attribute 'vendorID'

Any idea?

vendorID = GSFontInfoValueSingle()
vendorID.key = "vendorID"
vendorID.value = "MYID"

Font.properties.append(vendorID)

It works! Thanks

Font.properties["vendorID"] = "MYID"
1 Like

Nice.

Thanks Georg.
following your script I add that: font.properties["License URL"] = "https://.....

but on the font info i get a red !

what that means?

Its key is licenseURL.

1 Like

but if I add manually I don’t get any red!

If I add through python the red! appears

You used the key License URL. Use the key licenseURL.

Font.properties["licenseURL"] = "my.url"

1 Like

ohhhh thanks Sebastian! It works

The UI shows the description of the key, not the key itself.
The easies way to get to the key and the proper structure is by setting that property in the UI and then print(Font.properties).

1 Like