# Differences between various console font settings



## Kaminar (Oct 15, 2022)

A new screen.font option was added in FreeBSD 13. What is the difference between screen.font in /boot/loader.conf and font8x16, font8x14, font8x8 font setting options in /etc/rc.conf?


----------



## T-Daemon (Oct 16, 2022)

Kaminar said:


> What is the difference between screen.font in /boot/loader.conf and font8x16, font8x14, font8x8 font setting options in /etc/rc.conf?


screen.font will "Set font size for framebuffer mode." from fonts found in /boot/fonts, all terminus fonts (/usr/src/stand/fonts/Makefile). Framebuffer mode requires a EFI or VBE (VESA BIOS Extension) frame buffer.

Those listed to set in /etc/rc.conf are vgarom fonts for vt(4), found under /usr/share/vt/fonts (besides some other fonts), no frame buffer required. A hint can be found in /etc/defaults/rc.conf:

```
font8x16="NO"           # font 8x16 from /usr/share/{syscons,vt}/fonts/* (or NO).
```

Most external .fnt fonts can be places under the mentioned directories. Under /boot/fonts they must be gzip(1) and named only after their size, i.e. 12x24.fnt.gz.

Following screenshots show x11-fonts/spleen, set with screen.font in /boot/loader.conf:


----------



## Kaminar (Oct 16, 2022)

Thank you for explaining some of the details. Is there any advantage to setting EFI or VBE fonts over vgarom fonts for vt(4)? Or is there a plan to replace vgarom fonts with VBE fonts in the future?


----------



## Profighost (Oct 16, 2022)

Kaminar said:


> Is there any advantage to setting EFI or VBE fonts over vgarom fonts for vt(4)?


Depending on your screen (resolution and pixel-shape) you may get a more readable tty or it suits your taste more.

The vgarom fonts are built into the graphics adapter.
The OS has nothing to do with those. They are to provide text e.g. when there is no OS loaded or not capable to load and project fonts of its own.
To change/replace them you need to to change the firmware (de facto impossible) of your graphics adapter, or the graphics adapter itself.....
although it's hard to chose and tell which fonts are brought with it... after all it all also depends on your screen(s).
Depending on resolution and more pixelshape the same font may look better or worse on another screen.

Nearly all monitors provide oblong but not quadratic pixels.
The aspect ratio of the pixels differ as also a their distance to each other.
This has an significant effect on how a font looks like.

You simply have to trial-n-error to test which font suits you best.
Fortunately there are not so many (by default).
vidfont is a great help to check it out.

Unfortunately you cannot simply add any .fnt font to /usr/share/vt/fonts to get more choices,
because it needs more for a font to become a vt-font but just being .fnt, only.

I had understand this exact issue myself a couple of months ago, but cannot remember the details at the moment anymore.
In theory it's possible to create a new vt-font from any other one, but it's not trivial done.
On the other hand, even if you stay in tty only (no xorg/wayland/desktop...) the (few) choices in /usr/share/vt/font/ should be fully sufficient to have a good readable font on your screen, anyway.


----------

