How to change font size and font for all profiles in terminal

fontpreferencesterminal

So I have many profiles in my terminal preference, as shown below

profile

I would like to be able to change the font for all of these different profiles at once

3024 Day, 3024 Night, AdventureTime…

Right now I have to make such change one by one, how do I change the font once and for all?

Please let me know if it is not clear enough of what I am trying to do. Thanks in advance!

Best Answer

Very easy with an AppleScript code (here an example where all profiles are set to Menlo Regular 18 pt, note that "Menlo Regular" is named "Menlo-Regular" in font name):

tell application "Terminal"
    set ProfilesNames to name of every settings set
    repeat with ProfileName in ProfilesNames
        set font name of settings set ProfileName to "Menlo-Regular"
        set font size of settings set ProfileName to 18
    end repeat
end tell