#883566 console-setup-linux: Add a font which is 9 pixel wide

#883566#5
Date:
2017-12-05 09:57:13 UTC
From:
To:
I am trying to configure a framebuffer with 720 pixel width to have
exactly 80 columns in text mode.  The perfect font width would be 9
pixels.

Digging into console-setup, I found that it actually ships with 15x9
BDFs.  Quoting Fonts/Makefile:

Fixed15-BDFS := 9x15-IL2.bdf+9x15.bdf+9x15c.bdf

However, all variants with Fixed15 face actually have a width of 8
pixels:

$ file Lat15-Fixed15.psf
Lat15-Fixed15.psf: Linux/i386 PC Screen Font v1 data, 256 characters, Unicode directory, 8x15

This is because Fixed15 is not in ALL_FB_FONT_NAMES and therefore,
bdf2psf is *not* called with the --fb argument when generating the psf
from the BDFs.

I sort of wonder if this is actually a bug/oversight?
Is Fixed15 supposed to have size 15x8?  If no, the fix would be to add
it to the list of FB fonts.  However, such a "fix" would change the size
of a font which is likely in use by users, and would result in their
screen dimensions changing on them.

Therefore, I suggest to add a new face called Fixed15x9.  The only
difference to Fixed15 is, that --fb is passed to bdf2psf, which avoids
cropping the width down to 8 pixels.

https://github.com/mlang/brlpi/blob/master/package/console-setup/0001-Add-Fixed15x9.patch

#883566#10
Date:
2017-12-05 17:27:10 UTC
From:
To:
When Fixed15 is used while the graphic card is in text mode (not
framebuffer), the font works as 15x9.  However, it has to be packaged as
15x8 because of the way the hardware/the kernel driver work.

Indeed.  These days people most likely use framebuffer so it makes sense
to improve the framebuffer support.  Fixed15 is not the only x9 font.
TerminusBoldVGA is another nice font which is developed as x9 font but
is packaged as x8.  Also all x8 VGA fonts and the non-bold Terminus font
are designed to look ok if they are used as x9 fonts.

Anton Zinoviev