How to change Console Fonts in Linux

Safi Ud Din Khan
2 min readMay 18, 2022

--

OK, So I always wondered how to change the default fonts in the Linux console outside of X or Wayland in VGA mode to display other languages and other Unicode characters. So I finally figured it out. So what I have learned is the format of console fonts used by Linux is called PC Screen Font or PSF fonts. You can change the console fonts at any time with the command “setfont <fontname.psf>” on the console at any time. The fonts will change instantly and you don’t have to restart or do anything as such. Though only 512 glyph are supported so no full Unicode at the same time.

Regarding complex right-to-left languages like Arabic script and Hebrew script, it is a bit more complicated and the tools like bidiv which I have used here to display the sample Urdu text properly to the most extent though still there are issues that have to do with the fonts as the Urdu script is slightly different and I would deal with it later.

The font I used here lives in the “/usr/share/consolefonts” folder of my distro and it is called “Arabic-VGA16.psf.gz”. I used “setfont Arabic-VGA16.psf.gz” to change the fonts and used “bidiv test.txt” to display the sample text. If you type “setfont” without any argument it will return the Linux console to default fonts.

--

--

Safi Ud Din Khan

I write on free and open-source software, Linux and other Unix-Like operating systems, programming and history.