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

2017-12-05 Thread Anton Zinoviev
On Tue, Dec 05, 2017 at 10:57:13AM +0100, Mario Lang wrote:
> 
> I sort of wonder if this is actually a bug/oversight?
> Is Fixed15 supposed to have size 15x8?

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.

> Therefore, I suggest to add a new face called Fixed15x9.

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



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

2017-12-05 Thread Mario Lang
Package: console-setup-linux
Version: 1.160
Severity: wishlist
Tags: patch

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

diff --git a/Fonts/Makefile b/Fonts/Makefile
index 3769cbe..e4afadd 100644
--- a/Fonts/Makefile
+++ b/Fonts/Makefile
@@ -9,6 +9,7 @@ include $(fntdir)/../rules.mk
 Fixed13-BDFS := 8x13-IL2.bdf+8x13.bdf+8x13c.bdf
 Fixed14-BDFS := georgian14.bdf+7x14-IL2.bdf+7x14.bdf+7x14c.bdf+h14.bdf+etl14-unicode.bdf
 Fixed15-BDFS := 9x15-IL2.bdf+9x15.bdf+9x15c.bdf
+Fixed15x9-BDFS := 9x15-IL2.bdf+9x15.bdf+9x15c.bdf
 Fixed16-BDFS := georgian16.bdf+unifont.bdf+h16.bdf+etl16-unicode.bdf
 Fixed18-BDFS := 9x18.bdf
 Fixed24x12-BDFS := h24.bdf+etl24-unicode.bdf
@@ -169,7 +170,7 @@ Vietnamese-legacy28x16-BDFS := $(call adddouble, $(Vietnamese-legacy14-BDFS))
 ###
 
 # All available non-legacy font faces
-NONLEGACY_FACES := Fixed13 Fixed14 Fixed15 Fixed16 \
+NONLEGACY_FACES := Fixed13 Fixed14 Fixed15 Fixed15x9 Fixed16 \
 	Fixed18 Fixed24x12 \
 	FixedBold13 FixedBold14 FixedBold15 FixedBold16 \
 	FixedBold18 FixedBold24x12  \
@@ -208,7 +209,7 @@ ALL_FONT_NAMES := $(sort $(foreach face, $(FACES), \
 
 # Good-looking fonts with enough i18n support
 GOOD_FONT_NAMES := $(filter \
-		%-Fixed13 %-Fixed14 %-Fixed15 %-Fixed16 %-Fixed18 \
+		%-Fixed13 %-Fixed14 %-Fixed15 %-Fixed15x9 %-Fixed16 %-Fixed18 \
 		%-Terminus12x6 %-Terminus14 %-Terminus16	\
 		%-Terminus22x11 %-Terminus24x12 %-Terminus20x10 \
 		%-Terminus28x14 %-Terminus32x16			\
@@ -232,10 +233,10 @@ BSD_FONT_NAMES := $(filter-out %x6 %x10 %x11 %x12 %x14 %x16, \
 $(FONT_NAMES)))
 
 # all available fonts for framebuffer
-ALL_FB_FONT_NAMES := $(filter %x6 %x10 %x11 %x12 %x14 %x16, \
+ALL_FB_FONT_NAMES := $(filter %x6 %x10 %x11 %x12 %x14 %-Fixed15x9 %x16, \
 			$(ALL_FONT_NAMES))
 # all vailable fonts not for framebuffer
-ALL_NONFB_FONT_NAMES := $(filter-out %x6 %x10 %x11 %x12 %x14 %x16, \
+ALL_NONFB_FONT_NAMES := $(filter-out %x6 %x10 %x11 %x12 %x14 %-Fixed15x9 %x16, \
 			$(ALL_FONT_NAMES))
 # all available fonts for FreeBSD
 ALL_BSD_FONT_NAMES := $(filter-out %x6 %x10 %x11 %x12 %x14 %x16, \
diff --git a/Fonts/soft.Makefile b/Fonts/soft.Makefile
index 2c54998..01182e8 100644
--- a/Fonts/soft.Makefile
+++ b/Fonts/soft.Makefile
@@ -1,2 +1,2 @@
-I18N_FONT_NAMES :=  Arabic-Fixed15 Arabic-Fixed16 Arabic-FixedBold15 Arabic-FixedBold16 Arabic-VGA14 Arabic-VGA16 Arabic-VGA28x16 Arabic-VGA32x16 Arabic-VGA8 Armenian-Fixed13 Armenian-Fixed14 Armenian-Fixed15 Armenian-Fixed16 Armenian-Fixed18 Armenian-Fixed24x12 Armenian-FixedBold14 Armenian-FixedBold16 Armenian-FixedBold24x12 Armenian-FixedOblique13 CyrAsia-Courier15 CyrAsia-Fixed13 CyrAsia-Fixed14 CyrAsia-Fixed15 CyrAsia-Fixed16 CyrAsia-Fixed18 CyrAsia-Fixed24x12 CyrAsia-FixedBold14 CyrAsia-FixedBold16 CyrAsia-FixedBold24x12 CyrAsia-FixedOblique13 CyrAsia-Lucid13 CyrAsia-Terminus12x6 CyrAsia-Terminus14 CyrAsia-Terminus16 CyrAsia-Terminus20x10 CyrAsia-Terminus22x11 CyrAsia-Terminus24x12 CyrAsia-Terminus28x14 CyrAsia-Terminus32x16 CyrAsia-TerminusBold12x6 CyrAsia-TerminusBold14 CyrAsia-TerminusBold16 CyrAsia-TerminusBold20x10 CyrAsia-TerminusBold22x11 CyrAsia-TerminusBold24x12 CyrAsia-TerminusBold28x14 CyrAsia-TerminusBold32x16 CyrAsia-TerminusBoldVGA14 CyrAsia-TerminusBoldVGA16 CyrKoi-Courier13 CyrKoi-Courier15 CyrKoi-Courier16 CyrKoi-CourierBold13 CyrKoi-CourierBold15 CyrKoi-Fixed13 CyrKoi-Fixed14 CyrKoi-Fixed15 CyrKoi-Fixed16 CyrKoi-Fixed18 CyrKoi-Fixed24x12 CyrKoi-FixedBold13 CyrKoi-FixedBold14 CyrKoi-FixedBold15 CyrKoi-FixedBold16 CyrKoi-FixedBold18 CyrKoi-FixedBold24x12 CyrKoi-FixedOblique13 CyrKoi-Lucid13 CyrKoi-Lucid15 CyrKoi-LucidBold13 CyrKoi-LucidBold15 CyrKoi-Terminus12x6 CyrKoi-Terminus14 CyrKoi-Terminus16 CyrKoi-Terminus20x10 CyrKoi-Terminus22x11 CyrKoi-Terminus24x12 CyrKoi-Terminus28x14