fonts: Prefer a bigger font for high resolution screens
authorTakashi Iwai <tiwai@suse.de>
Tue, 18 Jun 2019 20:34:25 +0000 (22:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2019 08:11:24 +0000 (10:11 +0200)
commitdfd19a5004eff03755967086aa04254c3d91b8ec
tree569cd8274cc79defebd8bfb1474279990e4dd3e1
parent73a649d2b98e25f4960b8081080c78695fea8bc7
fonts: Prefer a bigger font for high resolution screens

Although we may have multiple fonts in kernel, the small 8x16 font is
chosen as default usually unless user specify the boot option.  This
is suboptimal for monitors with high resolutions.

This patch tries to assign a bigger font for such a high resolution by
calculating some penalty value.  This won't change anything for a
standard monitor like Full HD (1920x1080), but for a high res monitor
like UHD 4K, a bigger font like TER16x32 will be chosen once when
enabled in Kconfig.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/fonts/fonts.c