How to permamently change terminal font size via commandline/terminal?

I've been looking at this command:

defaults read com.apple.terminal "Window Settings"

But it seems there's no way to access the variables/settings inside it?

Any ideas is much appreciated. Thank you

Here's a sample output:

=> defaults read com.apple.terminal "Window Settings" | more
{
    Basic =     {
        Font = <62706c69 73743030 d4010203 04050618 19582476 65727369 6f6e5824 6f626a65 63747359 24617263 68697665 72542474 6f701200 0186a0a4 07081112 55246e75 6c6cd409 0a0b0c0d 0e0f1056 4e535369 7a65584e 5366466c 61677356 4e534e61 6d655624 636c6173 73234026 00000000 00001010 80028003 5d4d656e 6c6f2d52 6567756c 6172d213 1415165a 24636c61 73736e61 6d655824 636c6173 73657356 4e53466f 6e74a215 17584e53 4f626a65 63745f10 0f4e534b 65796564 41726368 69766572 d11a1b54 726f6f74 80010811 1a232d32 373c424b 525b6269 72747678 868b969f a6a9b2c4 c7cc0000 00000000 01010000 00000000 001c0000 00000000 00000000 00000000 00ce>;
        FontAntialias = 1;
        FontWidthSpacing = "1.004032258064516";
        ProfileCurrentVersion = "2.04";
        name = Basic;
        type = "Window Settings";
    };
    Grass =     {

Solution 1:

osascript -e "tell application \"Terminal\" to set normal text color of window 1 to ${color}"
osascript -e "tell application \"Terminal\" to set background color of window 1 to ${color}"
osascript -e "tell application \"Terminal\" to set the font name of window 1 to \"$1\""
osascript -e "tell application \"Terminal\" to set the font size of window 1 to $2"

http://www.ict4g.net/adolfo/notes/2014/07/16/change-osx-terminal-settings-from-command-line.html

Solution 2:

If you are using OS 10.13 Then simply go to shell and press Edit Background Color if you want to change the background.

Use command + [ - / +] in order to decrease or increase the font size

At last

Shell -> Use settings as default and it will save the current settings as default settings.

P.S you can find shell in menu bar (on the top of the screen)