> Date: Mon, 31 May 2021 12:21:39 +0200
> From: Frederic Cambus <f...@statdns.com>
> 
> Hi tech@,
> 
> The size of kernel fonts in RAMDISKs has long been a problem on systems
> with large screen resolutions booting via EFI, as currently only the 8x16
> font is built into RAMDISKs. As those systems are becoming more common, I
> would like to revisit the topic.
> 
> Currently, we decide which font is built into which kernel in wsfont(9),
> which will only add the 8x16 one when SMALL_KERNEL is defined, and larger
> fonts for selected architectures for !SMALL_KERNEL. There is no way to
> distinguish between RAMDISK and RAMDISK_CD kernels using #ifdef trickery,
> so with the current way we cannot add larger fonts only on RAMDISK_CD.
> As a reminder, we cannot add them to RAMDISK because there is no space
> left on the floppies, and there is no support for EFI systems on the
> floppies anyway.
> 
> However, unless I overlooked something, this could be solved by adding
> option directives directly in the RAMDISK_CD kernel configuration file.
> 
> This is how it would look like for amd64:
> 
> Index: sys/arch/amd64/conf/RAMDISK_CD
> ===================================================================
> RCS file: /cvs/src/sys/arch/amd64/conf/RAMDISK_CD,v
> retrieving revision 1.190
> diff -u -p -r1.190 RAMDISK_CD
> --- sys/arch/amd64/conf/RAMDISK_CD    27 Dec 2020 23:05:37 -0000      1.190
> +++ sys/arch/amd64/conf/RAMDISK_CD    31 May 2021 09:39:24 -0000
> @@ -20,6 +20,11 @@ option             MSDOSFS
>  option               INET6
>  option               CRYPTO
>  
> +option               FONT_SPLEEN8x16
> +option               FONT_SPLEEN12x24
> +option               FONT_SPLEEN16x32
> +option               FONT_SPLEEN32x64
> +
>  option               RAMDISK_HOOKS
>  option               MINIROOTSIZE=7360
>  
> Does this look reasonable?

I would skip some sizes.  8x16 is readable on any screen size where
12x24 would be picked.  And maybe 16x32 is good enough for 4K screens
as well?

> If it does and if we want to go this way, I can try to build a release
> and check if MINIROOTSIZE must be bumped on RAMDISK_CD. Then we could do
> the same for i386, armv7 and arm64.

I'm all for it, but last time this came up Theo didn't like it and
suggested adding code to scale up the fonts instead.  I really don't
think you want to upscale the 8x16 font to 32x64.  But if we add the
16x32 font, upscaling that to 32x64 for the really big screens might
be an option and a reasonable compromise?

But figuring out how much things grow by adding the 16x32 font would
be a good start.

Reply via email to