5

I am making a console application running on Raspbian. I hit CTRL+ALT+F2 to get to the console view, but now I do not have access to the same fonts I had in terminal. I am trying to install a specific ttf font. It works fine in terminal, but I need it to be full-screen. When I use dpkg-reconfigure console-setup, I only get a list of a few fonts, not the one I am trying to install. I tried setfont, but I get a Bad input file size error, probably because I imagine true type fonts are not supported by the console. I tried converting the font using FontForge, but I'm not sure which format to convert it to, because the ones I tried gave the same error.

An answer to any of the following would fix my problem:

  1. How do I use a ttf in the console?
  2. How do I convert a ttf to a format the console could use?
  3. How do I fullscreen the terminal (no GUIs or windows, just text)?
5

The console uses bitmapped (.psf) fonts, while X can use vector fonts such as TrueType (.ttf) in the terminal apps. There are a few console fonts you can select from with sudo dpkg-reconfigure console-setup - terminus 16x32 being my favorite on a large display. There are a other bitmap console fonts around, but they tend to require manual installation and focus on smaller font sizes.

If you are running directly on the console, you can try the fbterm package. It will allow you to select from installed TrueType fonts. To install TrueType fonts:

  1. Install fontconfig (sudo apt install fontconfig)
  2. Copy .ttf fonts to /usr/share/fonts/truetype
  3. Rebuild font cache (fc-cache -f -v)

I was able to select a variety of fonts with no problems using something like fbterm -s 32 -n "Liberation Mono" (-s to specify size, -n to specify font name as shown in fc-list).

| improve this answer | |
  • I am required to use a more retro-style font like Joystix Monospace, but I can only find that in ttf. Is there any way to convert that? – tyjkenn Aug 30 '17 at 18:51
  • From what I've been able to find, converting .ttf to .psf is difficult and generally not worth it. You might want to look into fbterm. I haven't used it, but it is supposed to support truetype and other features using the framebuffer, no X required. – bobstro Aug 30 '17 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.