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]: <https://dev.archlinux.org/~tomegun/kernel.bdf>
[1]: <https://dev.archlinux.org/~tomegun/latarcyrheb.bdf>
[2]: <http://i.imgur.com/J2tM4.jpg>
This commit is contained in:
Tom Gundersen 2012-09-25 22:22:05 +02:00 committed by Kay Sievers
parent ffc227c956
commit f51356b462
3 changed files with 10 additions and 20 deletions

View file

@ -160,43 +160,36 @@ AM_LDFLAGS = $(OUR_LDFLAGS)
if TARGET_GENTOO if TARGET_GENTOO
AM_CPPFLAGS += \ AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-DKBD_SETFONT=\"/usr/bin/setfont\" \ -DKBD_SETFONT=\"/usr/bin/setfont\"
-DDEFAULT_FONT=\"LatArCyrHeb-16\"
else else
if TARGET_ARCH if TARGET_ARCH
AM_CPPFLAGS += \ AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-DKBD_SETFONT=\"/usr/bin/setfont\" \ -DKBD_SETFONT=\"/usr/bin/setfont\"
-DDEFAULT_FONT=\"LatArCyrHeb-16\"
else else
if TARGET_FRUGALWARE if TARGET_FRUGALWARE
AM_CPPFLAGS += \ AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-DKBD_SETFONT=\"/usr/bin/setfont\" \ -DKBD_SETFONT=\"/usr/bin/setfont\"
-DDEFAULT_FONT=\"LatArCyrHeb-16\"
else else
if TARGET_MANDRIVA if TARGET_MANDRIVA
AM_CPPFLAGS += \ AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/bin/loadkeys\" \ -DKBD_LOADKEYS=\"/bin/loadkeys\" \
-DKBD_SETFONT=\"/bin/setfont\" \ -DKBD_SETFONT=\"/bin/setfont\"
-DDEFAULT_FONT=\"LatArCyrHeb-16\"
else else
if TARGET_ANGSTROM if TARGET_ANGSTROM
AM_CPPFLAGS += \ AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \ -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
-DKBD_SETFONT=\"/usr/bin/setfont\" \ -DKBD_SETFONT=\"/usr/bin/setfont\"
-DDEFAULT_FONT=\"LatArCyrHeb-16\"
else else
if TARGET_MAGEIA if TARGET_MAGEIA
AM_CPPFLAGS += \ AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/bin/loadkeys\" \ -DKBD_LOADKEYS=\"/bin/loadkeys\" \
-DKBD_SETFONT=\"/bin/setfont\" \ -DKBD_SETFONT=\"/bin/setfont\"
-DDEFAULT_FONT=\"LatArCyrHeb-16\"
else else
AM_CPPFLAGS += \ AM_CPPFLAGS += \
-DKBD_LOADKEYS=\"/bin/loadkeys\" \ -DKBD_LOADKEYS=\"/bin/loadkeys\" \
-DKBD_SETFONT=\"/bin/setfont\" \ -DKBD_SETFONT=\"/bin/setfont\"
-DDEFAULT_FONT=\"latarcyrheb-sun16\"
endif endif
endif endif
endif endif

View file

@ -112,9 +112,7 @@
<listitem><para>Configures the console <listitem><para>Configures the console
font, the console map and the unicode font, the console map and the unicode
font map. <varname>FONT=</varname> font map.</para></listitem>
defaults to
<literal>latarcyrheb-sun16</literal>.</para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>

View file

@ -215,10 +215,9 @@ int main(int argc, char **argv) {
utf8 = is_locale_utf8(); utf8 = is_locale_utf8();
vc_keymap = strdup("us"); vc_keymap = strdup("us");
vc_font = strdup(DEFAULT_FONT);
if (!vc_keymap || !vc_font) { if (!vc_keymap) {
log_error("Failed to allocate strings."); log_error("Failed to allocate string.");
goto finish; goto finish;
} }