Load Lat15-Terminus16 console font if no framebuffer is available.
authorUlrich Dangel <uli@spamt.net>
Sat, 24 Oct 2009 17:40:30 +0000 (19:40 +0200)
committerUlrich Dangel <uli@spamt.net>
Sat, 24 Oct 2009 17:56:10 +0000 (19:56 +0200)
Only load Uni3-Terminus font if framebuffer is present due to restrictions
in VGA mode to prevent strange characters in console. Thanks to Thorsten
Glaser for his hint. [Closes: issue318]

autoconfig.functions

index 5519f28..75060f8 100755 (executable)
@@ -78,6 +78,11 @@ checkbootparam(){
   esac
 }
 
   esac
 }
 
+# Check if currently using a framebuffer
+hasfb() {
+    [ -e /dev/fb0 ] && return 0 || return 1
+}
+
 # Check wheter a configuration variable (like $CONFIG_TOHD) is
 # enabled or not
 checkvalue(){
 # Check wheter a configuration variable (like $CONFIG_TOHD) is
 # enabled or not
 checkvalue(){
@@ -236,6 +241,9 @@ config_language(){
        else
           ewarn "/usr/share/consolefonts/Uni3-Terminus16.psf.gz not available. Please upgrade package console-terminus." ; eend 1
        fi
        else
           ewarn "/usr/share/consolefonts/Uni3-Terminus16.psf.gz not available. Please upgrade package console-terminus." ; eend 1
        fi
+       if ! hasfb ; then
+          CONSOLEFONT='Lat15-Terminus16'
+       fi
     fi
  fi
 
     fi
  fi