# Changing font in command line



## 1-800-It's-NOT-UNIX (Aug 12, 2018)

Forgive me if there is an answer to this question that I've missed, but I have done my due diligence to research it, and have not found a suitable answer:

I have made a drive, command line only - no gui, and I'm trying to adjust the size of the terminal font, and make the color persistent. I have already altered the font type, via `vidcontrol -f <fontname>`, and made the necessary entry in /etc/rc.conf of `allscreens_flags="-f <fontname>"`. However, I would like to make the color change of `vidcontrol [I]foo[/I] [I]foo[/I]` persistent, and adjust the font to a smaller size. Even as root, `kldload vesa` and `vidcontrol -i MODE`, `vidcontrol MODE_X`, etc. do not work for me. Is this an outdated section of the manual? Have there been changes? Or am I simply missing a step. As stated, I have tried to research this, but Google is a mess of answers going back over a decade, none of which help. Any assistance that can be given is much appreciated. Thank you.


----------



## ShelLuser (Aug 12, 2018)

The best way to do this that I'm aware of is by setting up the terminal console driver in /boot/loader.conf. See vt(4) for an overview of options which you can use to set this up.

You're probably looking for kern.vt.color.<colornum>.rgb. Or perhaps TERMINAL_KERN_ATTR.


----------



## 1-800-It's-NOT-UNIX (Aug 12, 2018)

I made the color change of `vidcontrol [I]foo[/I] [I]foo[/I]` persistent by adding it to .zshrc (since I'm using zsh, obviously). I'm assuming that there's also a command that I can add to my rc for font size, as well as color?


----------



## SirDice (Aug 13, 2018)

1-800-It's-NOT-UNIX said:


> Even as root, `kldload vesa` and `vidcontrol -i MODE`, `vidcontrol MODE_X`, etc. do not work for me.


These commands are for the 'old' sc(4) console. Recent versions of FreeBSD use vt(4).

https://wiki.freebsd.org/Newcons


----------



## 1-800-It's-NOT-UNIX (Aug 15, 2018)

SirDice said:


> These commands are for the 'old' sc(4) console. Recent versions of FreeBSD use vt(4).
> 
> https://wiki.freebsd.org/Newcons



Thanks for the information. It looks like I have some reading to do, this weekend.


----------



## 1-800-It's-NOT-UNIX (Aug 29, 2018)

I went into /usr/share/vt/fonts, found an 8x8 font to use, and then entered it into /etc/rc.conf. This did what I wanted to shrink the font size, but the font shape is a little bit cursive looking in its current configuration...

 ... Is there a way to add _new_ fonts to /usr/share/vt/fonts? Thank you!


----------

