How to access names of master's numbers?

How to access names of master’s numbers ? :slight_smile:

Which numbers are you referring to?

The Number Values in the masters. There doesn’t seem to be an apparent way of getting their names.

1 Like

What about this:

for number in Font.numbers:
	print(number.name)
	for master in Font.masters:
		print(
			master.name,
			master.numberValueForName_(number.name).value(),
			)
1 Like

You can also access the numbers of a master directly:

for (id, info) in Font.masters[0].numberValues().items():
	print(f"{info.name()} → {info.value()}")

I want to copy numbers from one file to another, so I need access to their names.