• Setting the TTY VT font globally

    From Anton Shepelev@21:1/5 to All on Sat Sep 21 19:20:31 2024
    Hello, all.

    FreeBSD 14.1 RELEASE here.

    The virtual TTYs (Ctrl+Alt+F1..F8) are provided through VT(4),
    the man page to which mentions only one tool for setting
    up the font -- vidcontrol(1), which affects only the TTY on which
    the program is invoked.

    How, then, can I set up the font I need (e.g. terminus-b32.fnt),
    a) as early in the boot process as possble, and
    b) for all TTYs, 1 to 8 ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Winston@21:1/5 to Anton Shepelev on Sat Sep 21 19:48:30 2024
    Anton Shepelev <anton.txt@gmail.moc> writes:
    FreeBSD 14.1 RELEASE here.

    The virtual TTYs (Ctrl+Alt+F1..F8) are provided through VT(4),
    the man page to which mentions only one tool for setting
    up the font -- vidcontrol(1), which affects only the TTY on which
    the program is invoked.

    Actually, I think it operates on stdin, which you can specify.

    How, then, can I set up the font I need (e.g. terminus-b32.fnt),
    a) as early in the boot process as possble, and
    b) for all TTYs, 1 to 8 ?

    The following, done as root, perhaps in /etc/rc.local, might work:

    vidcontrol -f terminus-b32 </dev/ttyv1
    vidcontrol -f terminus-b32 </dev/ttyv2
    vidcontrol -f terminus-b32 </dev/ttyv3
    vidcontrol -f terminus-b32 </dev/ttyv4
    vidcontrol -f terminus-b32 </dev/ttyv5
    vidcontrol -f terminus-b32 </dev/ttyv6
    vidcontrol -f terminus-b32 </dev/ttyv7
    vidcontrol -f terminus-b32 </dev/ttyv8

    (or use a shell loop).

    There may well be a more elegant solution, such as some kern.vt.*
    variable one can set, but I don't know it.
    -WBE

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Detlef Sax@21:1/5 to Anton Shepelev on Sun Sep 22 07:51:17 2024
    On Sat, 21 Sep 2024 19:20:31 -0000 (UTC), Anton Shepelev wrote:

    Hello, all.

    FreeBSD 14.1 RELEASE here.

    The virtual TTYs (Ctrl+Alt+F1..F8) are provided through VT(4),
    the man page to which mentions only one tool for setting
    up the font -- vidcontrol(1), which affects only the TTY on which
    the program is invoked.

    How, then, can I set up the font I need (e.g. terminus-b32.fnt),
    a) as early in the boot process as possble, and
    b) for all TTYs, 1 to 8 ?

    Simply put following into /etc/rc.config:
    fontb32="terminus-b32.fnt"

    sysrc fontb32="terminus-b32.fnt"
    does the job.

    man rc.conf
    or
    less /etc/defaults/rc.conf
    for other useful settings.

    Detlef
    --
    https://www.12schrittefrei.de/
    https://www.noart.de/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Shepelev@21:1/5 to Winston on Sun Sep 22 12:58:40 2024
    Winston <wbe@ubeblock.psr.com.invalid> wrote:
    Anton Shepelev <anton.txt@gmail.moc> writes:
    FreeBSD 14.1 RELEASE here.

    The virtual TTYs (Ctrl+Alt+F1..F8) are provided through VT(4),
    the man page to which mentions only one tool for setting
    up the font -- vidcontrol(1), which affects only the TTY on which
    the program is invoked.

    Actually, I think it operates on stdin, which you can specify.

    Thanks, I didn't realise that: the man page does not say so
    explicitly[*], but provides examles with `< /dev/ttyv<n>', which,
    however, make no changes, but dump the contents of a terminal to
    stdout or an .scr file. How can a redirection of STDIN affect which
    TTY takes the new settings? I see it does, but am a loss as to
    how... There only one mentinon of standard input in the man page,
    and that in the context of the -p option.

    * It is my long-standing conviction that documenation shall state
    explicitly whatever it has to state, and use examples only
    to /illustarte/ directly expressed information. VIDCONTROL(8)
    seems to fall short of this.

    How, then, can I set up the font I need (e.g. terminus-b32.fnt),
    a) as early in the boot process as possble, and
    b) for all TTYs, 1 to 8 ?

    The following, done as root, perhaps in /etc/rc.local, might work:

    vidcontrol -f terminus-b32 </dev/ttyv1
    vidcontrol -f terminus-b32 </dev/ttyv2
    vidcontrol -f terminus-b32 </dev/ttyv3
    vidcontrol -f terminus-b32 </dev/ttyv4
    vidcontrol -f terminus-b32 </dev/ttyv5
    vidcontrol -f terminus-b32 </dev/ttyv6
    vidcontrol -f terminus-b32 </dev/ttyv7
    vidcontrol -f terminus-b32 </dev/ttyv8

    (or use a shell loop).

    Indeed, thank you.

    There may well be a more elegant solution, such as some kern.vt.*
    variable one can set, but I don't know it.

    VT(4) does not mention a suitable variable.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Shepelev@21:1/5 to Detlef Sax on Sun Sep 22 13:17:57 2024
    Detlef Sax <sax@noart.de> wrote:
    On Sat, 21 Sep 2024 19:20:31 -0000 (UTC), Anton Shepelev wrote:

    FreeBSD 14.1 RELEASE here.

    The virtual TTYs (Ctrl+Alt+F1..F8) are provided through VT(4),
    the man page to which mentions only one tool for setting
    up the font -- vidcontrol(1), which affects only the TTY on which
    the program is invoked.

    How, then, can I set up the font I need (e.g. terminus-b32.fnt),
    a) as early in the boot process as possble, and
    b) for all TTYs, 1 to 8 ?

    Simply put following into /etc/rc.config:
    fontb32="terminus-b32.fnt"

    You mean in /etc/rc.conf? Unfortunately, this line
    has no effect, at least no the one I seek. I think
    this is an unrecognised variable, not check by any
    component.

    sysrc fontb32="terminus-b32.fnt"
    does the job.

    Yes, and I wonder why FreeBSD provides a dedicdated
    utility for adding lines info rc.conf. Querying those
    values is certainly useful, though.

    man rc.conf
    or
    less /etc/defaults/rc.conf
    for other useful settings.

    Thank you, but fontb32 is not mentioned in either.
    How did you learn about the `fontb32' setting?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Detlef Sax@21:1/5 to Anton Shepelev on Sun Sep 22 18:28:45 2024
    On Sun, 22 Sep 2024 13:17:57 -0000 (UTC), Anton Shepelev wrote:
    Detlef Sax <sax@noart.de> wrote:
    On Sat, 21 Sep 2024 19:20:31 -0000 (UTC), Anton Shepelev wrote:

    FreeBSD 14.1 RELEASE here.

    The virtual TTYs (Ctrl+Alt+F1..F8) are provided through VT(4),
    the man page to which mentions only one tool for setting
    up the font -- vidcontrol(1), which affects only the TTY on which
    the program is invoked.

    How, then, can I set up the font I need (e.g. terminus-b32.fnt),
    a) as early in the boot process as possble, and
    b) for all TTYs, 1 to 8 ?

    Simply put following into /etc/rc.config:
    fontb32="terminus-b32.fnt"

    You mean in /etc/rc.conf? Unfortunately, this line
    has no effect, at least no the one I seek. I think
    this is an unrecognised variable, not check by any
    component.

    sysrc fontb32="terminus-b32.fnt"
    does the job.

    Yes, and I wonder why FreeBSD provides a dedicdated
    utility for adding lines info rc.conf. Querying those
    values is certainly useful, though.

    man rc.conf
    or
    less /etc/defaults/rc.conf
    for other useful settings.

    Thank you, but fontb32 is not mentioned in either.
    How did you learn about the `fontb32' setting?

    If you call vidcontrol in a terminal (no Xorg terminal)
    and you select the terminus-b32.fnt in this ncurses dialog
    (some colors with a white alike background)
    than you got the answer after finishing this dialog:
    fontb32=terminus-b32.fnt
    white on black on my screen and this may vary.

    Tested here 4 min. ago on
    FreeBSD 14.1-RELEASE-p5 GENERIC amd64

    Detlef
    --
    https://www.12schrittefrei.de/
    https://www.noart.de/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jens Schweikhardt@21:1/5 to All on Mon Sep 23 18:56:35 2024
    Anton Shepelev <anton.txt@gmail.moc> wrote
    in <vcn69v$1u780$1@paganini.bofh.team>:
    #
    # Hello, all.
    #
    # FreeBSD 14.1 RELEASE here.
    #
    # The virtual TTYs (Ctrl+Alt+F1..F8) are provided through VT(4),
    # the man page to which mentions only one tool for setting
    # up the font -- vidcontrol(1), which affects only the TTY on which
    # the program is invoked.
    #
    # How, then, can I set up the font I need (e.g. terminus-b32.fnt),
    # a) as early in the boot process as possble, and
    # b) for all TTYs, 1 to 8 ?

    I have in /etc/rc.conf this for the gallant font:

    allscreens_flags="-f gallant"

    That's the Sun Microsystems console font, simply unsurpassed,
    for those who remember. Sigh...

    Regards,

    Jens
    --
    Jens Schweikhardt https://www.schweikhardt.net/
    SIGSIG -- signature too long (core dumped)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Shepelev@21:1/5 to Jens Schweikhardt on Tue Sep 24 13:38:52 2024
    Jens Schweikhardt <usenet@schweikhardt.net> wrote:
    Anton Shepelev <anton.txt@gmail.moc> wrote
    in <vcn69v$1u780$1@paganini.bofh.team>:
    #
    # Hello, all.
    #
    # FreeBSD 14.1 RELEASE here.
    #
    # The virtual TTYs (Ctrl+Alt+F1..F8) are provided through VT(4),
    # the man page to which mentions only one tool for setting
    # up the font -- vidcontrol(1), which affects only the TTY on which
    # the program is invoked.
    #
    # How, then, can I set up the font I need (e.g. terminus-b32.fnt),
    # a) as early in the boot process as possble, and
    # b) for all TTYs, 1 to 8 ?

    I have in /etc/rc.conf this for the gallant font:

    allscreens_flags="-f gallant"

    Than you, Jens.

    That's the Sun Microsystems console font, simply unsurpassed,
    for those who remember. Sigh...

    Yes, it is beautiful. It is hard to make a low-res raster font
    avec serif and so well-shaped. And this font is not in the old-shool font-pack:

    <https://int10h.org/oldschool-pc-fonts/>
    (but the font index does not show all the fonts...)

    How can one setup the TTYs with a high-DPI monitor? In Windows, I
    simply set the size for my raster fonts to a multiple of the native
    size, to have pixel doubling, tripling, or quadrupling. That way,
    the fonts are rendered perfecly sharp. Is anything similar possible
    in FreeBSD?

    P.S. Why did you set the `#' character to prepend quoted lines?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)