終端機字型

  1. 現在的螢幕解析度都很高,預設的終端機字型太小,設定指令如下:
    [root@dyw1 ~]# setfont --help
    Usage: setfont [write-options] [-<N>] [newfont..] [-m consolemap] [-u unicodemap]
      write-options (take place before file loading):
        -o  <filename>  Write current font to <filename>
        -O  <filename>  Write current font and unicode map to <filename>
        -om <filename>  Write current consolemap to <filename>
        -ou <filename>  Write current unicodemap to <filename>
    If no newfont and no -[o|O|om|ou|m|u] option is given,
    a default font is loaded:
        setfont         Load font "default[.gz]"
        setfont -<N>    Load font "default8x<N>[.gz]"
    The -<N> option selects a font from a codepage that contains three fonts:
        setfont -{8|14|16} codepage.cp[.gz]   Load 8x<N> font from codepage.cp
    Explicitly (with -m or -u) or implicitly (in the fontfile) given mappings
    will be loaded and, in the case of consolemaps, activated.
        -h<N>      (no space) Override font height.
        -m <fn>    Load console screen map.
        -u <fn>    Load font unicode map.
        -m none    Suppress loading and activation of a screen map.
        -u none    Suppress loading of a unicode map.
        -v         Be verbose.
        -C <cons>  Indicate console device to be used.
        -V         Print version and exit.
    Files are loaded from the current directory or /lib/kbd/*/.
    
  2. setfont 的輔助說明,字型目錄在 /lib/kbd/*/。
    [root@dyw1 ~]# ll /lib/kbd/
    total 20
    drwxr-xr-x. 3 root root 8192 Jun 27 06:15 consolefonts
    drwxr-xr-x. 2 root root 4096 Jun 27 06:15 consoletrans
    drwxr-xr-x. 4 root root   31 Jun 27 06:15 keymaps
    drwxr-xr-x. 2 root root 4096 Jun 27 06:15 unimaps
    
  3. 設定字型
    [root@dyw1 ~]# setfont -v /lib/kbd/consolefonts/sun12x22.psfu.gz
    
  4. 將設定寫到 /etc/locale.conf,開機立即生效。
    [root@dyw1 ~]# cat /etc/locale.conf
    LANG="en_US.UTF-8"
    SYSFONT="sun12x22.psfu"