From 98fc0cb81a7b5bd8074041d674ebe3da9f9a2d8e Mon Sep 17 00:00:00 2001 From: Jonathon Hall Date: Fri, 11 Aug 2023 13:16:00 -0400 Subject: [PATCH] initrd/bin/setconsolefont.sh: Reduce threshold for 2x console to 1350 Based on feedback, 1440p displays can benefit from 2x console as well. Err toward a font too large rather than too small and lower the threshold to 1350, which is the threshold fbwhiptail uses for 1.5x. Signed-off-by: Jonathon Hall --- initrd/bin/setconsolefont.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/initrd/bin/setconsolefont.sh b/initrd/bin/setconsolefont.sh index b2fba59e..1f217741 100755 --- a/initrd/bin/setconsolefont.sh +++ b/initrd/bin/setconsolefont.sh @@ -19,7 +19,14 @@ fi CONSOLE_HEIGHT="$(cut -d, -f2 /sys/class/graphics/fb0/virtual_size)" -if [ "$CONSOLE_HEIGHT" -ge 1600 ]; then +# Deciding scale based on resolution is inherently heuristic, as the scale +# really depends on resolution, physical size, how close the display is to the +# user, and personal preference. +# +# fbwhiptail starts using 1.5x scale at 1350 lines, but we can only choose 1x +# or 2x (without shipping more fonts). Err toward making the console too large +# rather than too small and go to 2x at 1350 lines. +if [ "$CONSOLE_HEIGHT" -ge 1350 ]; then DEBUG "Double console font size due to framebuffer height $CONSOLE_HEIGHT" # Double the default font size by reading it out, then applying it again # with setfont's -d option (double font size)