chiark / gitweb /
vconsole: default to the kernel compiled-in font
authorTom Gundersen <teg@jklm.no>
Tue, 25 Sep 2012 20:22:05 +0000 (22:22 +0200)
committerKay Sievers <kay@vrfy.org>
Wed, 3 Oct 2012 13:42:19 +0000 (15:42 +0200)
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>

Makefile.am
man/vconsole.conf.xml
src/vconsole/vconsole-setup.c

index 683685192100552f563082d60039aef6fc7f5b7a..acc8f87701181f6168cb07ad9ce9f02ee7ba2788 100644 (file)
@@ -160,43 +160,36 @@ AM_LDFLAGS = $(OUR_LDFLAGS)
 if TARGET_GENTOO
 AM_CPPFLAGS += \
        -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
 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\" \
 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\" \
 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\" \
 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\" \
 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\" \
 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\" \
 else
 AM_CPPFLAGS += \
        -DKBD_LOADKEYS=\"/bin/loadkeys\" \
-       -DKBD_SETFONT=\"/bin/setfont\" \
-       -DDEFAULT_FONT=\"latarcyrheb-sun16\"
+       -DKBD_SETFONT=\"/bin/setfont\"
 endif
 endif
 endif
 endif
 endif
 endif
index e23a98023244c6fdc4996501c34a4428889bd4dc..258c82bc627fa4880c2fbfce77cfe778026016ab 100644 (file)
 
                                 <listitem><para>Configures the console
                                 font, the console map and the unicode
 
                                 <listitem><para>Configures the console
                                 font, the console map and the unicode
-                                font map. <varname>FONT=</varname>
-                                defaults to
-                                <literal>latarcyrheb-sun16</literal>.</para></listitem>
+                                font map.</para></listitem>
                         </varlistentry>
 
                 </variablelist>
                         </varlistentry>
 
                 </variablelist>
index 62d9c8d7b5c5c7650def6aa6dd82a0868abb931b..1227b041d339c785cd32b6708354a364c02434dd 100644 (file)
@@ -215,10 +215,9 @@ int main(int argc, char **argv) {
         utf8 = is_locale_utf8();
 
         vc_keymap = strdup("us");
         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;
         }
 
                 goto finish;
         }