Console Fonts

There has to be a nice, pretty, easy-to-read, easy-on-the-eyes, each-character-visually-distinct font out there, that's suitable for use in the Linux console.

The default font is the closest to what I want... but it's a bit blocky. The regular size is too small, and the double size is too big.

The main other font seems to be Terminus? That's just, the vibe I get... I don't really like how it looks. It's very readable, just. Ugly.

I thought I was onto something for a bit with the fonts from The ZAP Group Australia. Unfortunately it seems they're just edited versions of the default font and Terminus font. Nice edited versions. But still.

I think if I could use the Amstrad font from that retro font pack, I would be very happy. It couldn't be too hard to convert a font to the appropriate format, right...?

2024-05-26 update:

Haven't gotten to the point of setting the Amstrad font as my console font yet. But, I have got it in i3 and xterm. Here, let me take a screenshot!

You may not like it, but this is what peak font looks like :p

Admittedly the bold and italic text is a bit uh. Subpar. Oh well! Something to fix later I guess.

So, the Linux console uses bitmap fonts. The Ultimate Oldschool PC Font Pack includes bitmap versions of the fonts in .otb files, and the Linux console uses .psfu (or .psf?) fonts zipped in .gz archives.

I've found mention of a program called fonttosfnt which you can apparently use to convert .psf fonts to .otb fonts. That's nearly what I want. The readme says:

fonttosfnt wraps a set of bdf or pcf bitmap fonts in a sfnt (TrueType or OpenType) wrapper.

Ahh... my brain is tired of this...

2024-05-27 update:

It's a new day, so I thought I'd try just loading the Amstrad font's .otb version with setfont. Didn't work :) it gives me this error:

setfont: ERROR setfont.c:549 kfont_load_font: Bad input file size

So fair enough. It doesn't want an .otb file, it wants a .psf file. Can't blame it for that.

I found a set of two perl scripts yesterday for editing .psf files: readpsf and writepsf. They can convert .psf fonts to bitmaps and back. So, if I had a program to convert an .otb font to a bitmap... it might take a fair bit of fiddling but I could convert a .psf font, change its bitmap and settings to the Amstrad font, and then convert it back.

Or... I keep seeing this unix stack exchange answer that walks through converting an .otf font to a .bdf file, then converting the .bdf file to a .psf file. And that's. That'd be easier, if it worked... it uses programs called otf2bdf and bdf2psf which, I wonder where I'd get them...

OK they're in the AUR. Typical.

Now what if I try to convert the .otb font with this. It's a kind of OpenType, right?

Yeah no "floating point exception" it doesn't like that.

I don't have an .otf version of the Amstrad font, only .ttf and .otb. Oh. Oh actually that's just the versions that were installed through the AUR, the full package also comes with Windows .fon and web .woff versions. And I did find a tool earlier, PSF Tools, that's supposed to be able to convert Windows .fon files to .psf. Let's give that a go.

Again, someone's made an AUR package for me.

OMG success!

So PSF Tools is a whole bunch of little programs for converting between all these different formats. The relevant ones to me are:

And now suddenly I have a file that works in the Linux console - I can run setfont /home/kagi/Bm437_Amstrad_PC-2y.psf and have the Amstrad font in my console, finally. :)

It's just as small as the default font. And I can double its size, but that makes it just as big as the default font doubled. So. I'm not perfectly content. But what an adventure, and what a pretty font to have in my console.

I still haven't worked out how to double a font when setting it in /etc/vconsole.conf...

Every guide I've read says that you can change the console font temporarily with setfont, and that you can double the size of a small font with setfont -d, and that you can permanently set the font by editing /etc/vconsole.conf with the line:

FONT=default8x16

And none of them go on to say that you can double the size of a font in /etc/vconsole.conf. The man page for it does not hint at the possibility. I think I must conclude that for some silly reason you can't double a font with this file.

The other solution that I can think of is to make a copy of the font that is bigger. And how to do that? Uhhhhh

Anyway here's the font: Bm437_Amstrad_PC-2y.psf

References: