From: Tom Gundersen Date: Tue, 25 Sep 2012 20:22:05 +0000 (+0200) Subject: vconsole: default to the kernel compiled-in font X-Git-Tag: v194~9 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=f51356b4628822a58ddecd217b0e5e079e39499e;hp=ffc227c9568eb0a12dc750761d1e5d68ea125aad vconsole: default to the kernel compiled-in font No longer override the default kernel font if nothing is specified in vconsole.conf. The default kernel font[0] provides ISO-8859-1 and box characters. Users of Arabic, Cyrilic or Hebrew must set a different font manually as these character sets were provided by the old default font [1], but are not any longer. Rationale: * it is counter-intuitive that an empty vconsole.conf file is different from adding FONT=""; * the version of the default font shipped with Arch (which is the upstream one) behaves very badly during early boot[2] (which should admittedly be fixed in the font itself); * the kernel already supplies a default font, it seems reasonable to use that unless anything else is specified; * This also avoids a needless slow call to setfont; and * We don't want to work around problems in the kernel (in case the compiled-in font is not acceptable for whatever reason). [0]: [1]: [2]: --- diff --git a/Makefile.am b/Makefile.am index 683685192..acc8f8770 100644 --- a/Makefile.am +++ b/Makefile.am @@ -160,43 +160,36 @@ AM_LDFLAGS = $(OUR_LDFLAGS) if TARGET_GENTOO AM_CPPFLAGS += \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ - -DKBD_SETFONT=\"/usr/bin/setfont\" \ - -DDEFAULT_FONT=\"LatArCyrHeb-16\" + -DKBD_SETFONT=\"/usr/bin/setfont\" else if TARGET_ARCH AM_CPPFLAGS += \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ - -DKBD_SETFONT=\"/usr/bin/setfont\" \ - -DDEFAULT_FONT=\"LatArCyrHeb-16\" + -DKBD_SETFONT=\"/usr/bin/setfont\" else if TARGET_FRUGALWARE AM_CPPFLAGS += \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ - -DKBD_SETFONT=\"/usr/bin/setfont\" \ - -DDEFAULT_FONT=\"LatArCyrHeb-16\" + -DKBD_SETFONT=\"/usr/bin/setfont\" else if TARGET_MANDRIVA AM_CPPFLAGS += \ -DKBD_LOADKEYS=\"/bin/loadkeys\" \ - -DKBD_SETFONT=\"/bin/setfont\" \ - -DDEFAULT_FONT=\"LatArCyrHeb-16\" + -DKBD_SETFONT=\"/bin/setfont\" else if TARGET_ANGSTROM AM_CPPFLAGS += \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ - -DKBD_SETFONT=\"/usr/bin/setfont\" \ - -DDEFAULT_FONT=\"LatArCyrHeb-16\" + -DKBD_SETFONT=\"/usr/bin/setfont\" else if TARGET_MAGEIA AM_CPPFLAGS += \ -DKBD_LOADKEYS=\"/bin/loadkeys\" \ - -DKBD_SETFONT=\"/bin/setfont\" \ - -DDEFAULT_FONT=\"LatArCyrHeb-16\" + -DKBD_SETFONT=\"/bin/setfont\" else AM_CPPFLAGS += \ -DKBD_LOADKEYS=\"/bin/loadkeys\" \ - -DKBD_SETFONT=\"/bin/setfont\" \ - -DDEFAULT_FONT=\"latarcyrheb-sun16\" + -DKBD_SETFONT=\"/bin/setfont\" endif endif endif diff --git a/man/vconsole.conf.xml b/man/vconsole.conf.xml index e23a98023..258c82bc6 100644 --- a/man/vconsole.conf.xml +++ b/man/vconsole.conf.xml @@ -112,9 +112,7 @@ Configures the console font, the console map and the unicode - font map. FONT= - defaults to - latarcyrheb-sun16. + font map. diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 62d9c8d7b..1227b041d 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -215,10 +215,9 @@ int main(int argc, char **argv) { utf8 = is_locale_utf8(); vc_keymap = strdup("us"); - vc_font = strdup(DEFAULT_FONT); - if (!vc_keymap || !vc_font) { - log_error("Failed to allocate strings."); + if (!vc_keymap) { + log_error("Failed to allocate string."); goto finish; }