Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Feb 2022 13:53:56 -0500
From:      Karl Vogel <vogelke@pobox.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: Old MAC console font
Message-ID:  <20220210185356.GA8143@ispcweb01.hcst.com>

next in thread | raw e-mail | index | archive | help
I took these notes when I was setting up my last FreeBSD box; I had the same
problem with huge fonts.

First, I fixed my keyboard to swap grave with tab, Ctrl with Caps-lock:

    me% kbdcontrol -d > keys.orig
    me% cp keys.orig keys.new

    [fixed keys.new]

    me% kbdcontrol -l keys.new
    me% kbdcontrol -r fast

Here's the unified diff, indented 4 spaces:

    --- keys.orig	2020-03-29 01:52:39.000000000 -0400
    +++ keys.new	2020-03-29 02:06:03.000000000 -0400
    @@ -3,7 +3,7 @@
     # code  base   shift  cntrl  shift  alt    shift  cntrl  shift state
     # ------------------------------------------------------------------
       000   nop    nop    nop    nop    nop    nop    nop    nop     O
    -  001   esc    esc    esc    esc    esc    esc    debug  esc     O
    +  001   '`'    '~'    nop    nop    '`'    '~'    nop    nop     O
       002   '1'    '!'    nop    nop    '1'    '!'    nop    nop     O
       003   '2'    '@'    nul    nul    '2'    '@'    nul    nul     O
       004   '3'    '#'    nop    nop    '3'    '#'    nop    nop     O
    @@ -31,7 +31,7 @@
       026   '['    '{'    esc    esc    '['    '{'    esc    esc     O
       027   ']'    '}'    gs     gs     ']'    '}'    gs     gs      O
       028   cr     cr     nl     nl     cr     cr     nl     nl      O
    -  029   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
    +  029   clock  clock  clock  clock  clock  clock  clock  clock   O
       030   'a'    'A'    soh    soh    'a'    'A'    soh    soh     C
       031   's'    'S'    dc3    dc3    's'    'S'    dc3    dc3     C
       032   'd'    'D'    eot    eot    'd'    'D'    eot    eot     C
    @@ -43,7 +43,7 @@
       038   'l'    'L'    ff     ff     'l'    'L'    ff     ff      C
       039   ';'    ':'    nop    nop    ';'    ':'    nop    nop     O
       040   '''    '"'    nop    nop    '''    '"'    nop    nop     O
    -  041   '`'    '~'    nop    nop    '`'    '~'    nop    nop     O
    +  041   esc    esc    esc    esc    esc    esc    debug  esc     O
       042   lshift lshift lshift lshift lshift lshift lshift lshift  O
       043   '\'    '|'    fs     fs     '\'    '|'    fs     fs      O
       044   'z'    'Z'    sub    sub    'z'    'Z'    sub    sub     C
    @@ -60,7 +60,7 @@
       055   '*'    '*'    '*'    '*'    '*'    '*'    '*'    '*'     O
       056   lalt   lalt   lalt   lalt   lalt   lalt   lalt   lalt    O
       057   ' '    ' '    nul    ' '    ' '    ' '    susp   ' '     O
    -  058   clock  clock  clock  clock  clock  clock  clock  clock   O
    +  058   lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl  lctrl   O
       059   fkey01 fkey13 fkey25 fkey37 scr01  scr11  scr01  scr11   O
       060   fkey02 fkey14 fkey26 fkey38 scr02  scr12  scr02  scr12   O
       061   fkey03 fkey15 fkey27 fkey39 scr03  scr13  scr03  scr13   O

Then I installed the terminus font:

    root# pkg fetch terminus-font
    root# pkg install terminus-font
    root# cp /var/cache/pkg/terminus-font-4.47_1.txz /root/packages

There's a way to convert these into something the console can use.
I got this via pkg install, but the sourceforge link has the fonts
in BDF format:

    root# pkg fetch pcf2bdf
    root# pkg install pcf2bdf
    root# cp /var/cache/pkg/pcf2bdf-1.05.txz /root/packages

To convert the fonts to something usable:

    root# cd /wherever/you/put/terminus-font
    root# vtfontcvt -w 6 -h 12 ter-u12n.bdf terminus-u12n.fnt

    root# ls -l terminus-u12n.fnt
    -rw-r--r-- 1 root wheel 16892 21-Oct-2020 19:24:17 terminus-u12n.fnt

    root# mv terminus-u12n.fnt /usr/share/vt/fonts

Gave it a try, looked good:

    root# cd /usr/share/vt/fonts
    root# vidcontrol -f terminus-u12n.fnt

You'll probably have to put something in /etc/rc.local or wherever to make
this the default.  See https://wiki.freebsd.org/Newcons#Font_Support for
details.

Hope this helps!

--
Karl Vogel / vogelke AT pobox DOT com / I don't speak for anyone at the moment

Hangover: the wrath of grapes.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220210185356.GA8143>