Looping through select list of masters

my_masters = [Font.masters[0], Font.masters[3]]

Or:

my_masters = []
for name in ["Bold", "Light"]:
    for master in Font.masters:
        if master.name == name:
            my_masters.append(master)

I should also note that you have a typo in your code (theseMasters vs. theseMaster)

1 Like