[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Console fonts, was Re: Jessie for Udoo X86?



On Sun 23 Apr 2017 at 18:55:03 (-0700), Larry Dighera wrote:

> I'd like to have more lines/rows and columns on the console tty.  I've read
> that 'vidcontrol' may do what I want, unfortunately 'apt-cache show
> vidcontrol' reports that it is virtual (unavailable).  
> 
> I am grateful for any clues you may be able to provide.

Best to start a new thread with a new subject, but anyway…

The Debian Way to set a default font for dmesg output, login prompt,
etc is (I think) to edit /etc/default/console-setup
I like Terminus fonts (package console-setup-linux, I think),
so I have:

ACTIVE_CONSOLES="/dev/tty[1-6]"
CHARMAP="UTF-8"
CODESET="Lat15"
#FONTFACE="Fixed"
FONTFACE="Terminus"
FONTSIZE="10x20"
#FONTSIZE="12x24"
#FONTSIZE="14x28"
#FONTSIZE="16x32"
VIDEOMODE=

in there, with various sizes available.

However, I prefer using aliases like:

alias my-font-tiny="setfont Lat15-Terminus12x6"
alias my-font-small="setfont Lat15-Terminus14"
alias my-font-medium="setfont Lat15-Terminus20x10"
alias my-font-large="setfont Lat15-Terminus24x12"
alias my-font-huge="setfont Lat15-Terminus28x14"
alias my-font-vast="setfont Lat15-Terminus32x16"

because you can then have different font sizes on each VC.
I also have a bash function to choose an arbitrary font:

function my-font-usr-share-consolefonts {
    [ -z "$1" ] && printf '%s\n' "Usage: $FUNCNAME /usr/share/consolefonts/<fontname>.psf.gz
        sets the specified font on the current VC.
        The command name serves as a reminder of the fonts' location.
        Use filename-completion to specify the appropriate filename.
        Redundant elements of the filename are stripped out before use.
        Typically, filenames start Lat15- or Uni." >&2 && return 1
    local FILENAME="$(basename "$1")"
    setfont "${FILENAME%%.*}"
}

Typing my-font<TAB><TAB> reminds me of the name of the command,
and the name of the command reminds me of the path to type in.
<TAB><TAB> then lists the font files to use filename completion on.

Cheers,
David.


Reply to: