[3517] instance.familyName doesn't work anymore?

Hey!

I made a few updates to Ysabeau, but I can’t roll them out because the script to write custom parameters to export stylistic sets into dedicated fonts no longer work. I believe I’ve had this problem before

In any case, this…

for thisInstance in Font.instances:
	if thisInstance.familyName.endswith("Infant"):

…fails because my instances don’t seem to have a .familyName anymore?

How should I solve this instead?

Never mind, fixed it. Apparently I just have to put a local family name custom parameter into my default instances, replacing the default family name with itself.

if thisInstance.familyName is none, you need to check Font.familyName

As I recall, thisInstance.familyName should default to Font.familyName if there’s no local family name custom parameter?

Yes. And in this case, you can do:

for thisInstance in Font.instances:
	if thisInstance.familyName and thisInstance.familyName.endswith("Infant"):

because the default name doesn’t contain “Infant”.

1 Like

Good to know, thanks!