TTY OFFICE: FONTS ================= The TTY console makes use of different fonts than X, Wayland, or Windows. On a Debian-based system, the TTY fonts are located in the /usr/share/consolefonts/ directory. They have a .psf or a .psf.gz filename extension. Many of the available fonts are quite small and appear to have been created back when 640x480 and 800x600 resolutions were common. Changing Fonts and Font Sizes ----------------------------- I know of two ways to change the font: 1. You can edit /etc/default/console-setup as root to specify a new font system-wide. The console-setup file on my laptop looks like this: # CONFIGURATION FILE FOR SETUPCON # Consult the console-setup(5) manual page. ACTIVE_CONSOLES="/dev/tty[1-6]" CHARMAP="UTF-8" CODESET="Lat15" FONTFACE="Terminus" FONTSIZE="16x32" VIDEOMODE= # The following is an example how to use a braille font # FONT='lat9w-08.psf.gz brl-8x8.psf' I've increased the default font size in this file. If you want to change your font, you can make use of any of the fonts available in /usr/share/consolefonts/. Note that the font size is entered in reverse order in the /etc/default/console-setup file. The font file name in /usr/share/consolefonts/ is Lat15-Terminus32x16.psf.gz. I'm not sure why that's inverted in console-setup. 2. You can use the 'setfont' command to change the font for an individual user. Again, you may make use of any of the fonts contained in /usr/share/consolefonts/. Here's an example of the syntax: $ setfont /usr/share/consolefonts/Lat15-Terminus24x12.psf.gz You can use setfont to change fonts and font sizes 'on the fly.' The change is not persistent across boots. The 'setfont' command can be quite handy. For example, you could add it to your .bashrc to set the TTY font for your user account alone. Or you could add a number of aliases to your .bashrc to allow you to quickly change fonts or font sizes: alias bigfont='setfont /usr/share/consolefonts/Lat15-Terminus32x16.psf.gz' alias medfont='setfont /usr/share/consolefonts/Lat15-Terminus24x12.psf.gz' alias smallfont='setfont /usr/share/consolefonts/Lat15-Terminus20x10.psf.gz' Converting TrueType fonts to PSF format --------------------------------------- The default choice of fonts for the TTY on a Debian-based system is quite limited. Perhaps you'd like a Courier font? Maybe you pine for Lucida Sans? Here's how you can convert them to .psf format.[1] Note that you need to do this from an X or Wayland session: 1. Install fontforge and bdf2psf $ sudo apt install fontforge bdf2psf 2. Open the TTF font in fontforge (the initial dialog is a file selection box). 3. From the menu, select Element > Bitmap Strikes Available > and put the appropriate font size number (something between 12 and 32 is likely) in the pixel sizes box > Press OK[1] 4. Select File > Generate Fonts > choose No Outline Font from the first drop-down and BDF from the other drop-down > and press Generate. 5. Specify a resolution. I've used 75, 96, and 100. They all work. 6. Press OK. There should now be a .bdf font in the same directory as the TTF font. 7. Open the BDF file with a text editor. Change the AVERAGE_WIDTH value to the nearest multiple of 10. If you don't make this change, the next step will produce an error. 8. Open a terminal and run the following command on the .bdf file to convert it to .psf: $ bdf2psf --fb myfilename.bdf /usr/share/bdf2psf/standard.equivalents /usr/share/bdf2psf/ascii.set 256 myfilename.psf Now you can move the .psf file to /usr/share/consolefonts/ and make use of it by editing /etc/default/console-setup or by using the setfont command. I'd suggest trying it out temporarily with setfont first, just in case something went wrong in the conversion process and your new font produces garbled output. Bonus: you can edit individual .psf font glyphs with psftools, available here: https://codeberg.org/gnarz/psftools -------------- [1] This part of the how-to is adapted from: https://darrengoossens.wordpress.com/2021/07/30/a-truetype-font-in-a-tty-glass_tty/comment-page-1/ [2] For more information on the bitmap strike operation, see: https://fontforge.org/docs/tutorial/editexample8.html#opening-importing-bitmap-strikes, especially Section 11.2.