Subject: setfont fails to load consolefonts

From: David Demelier <[email-masked]>
Date: Thu, 23 Jan 2020 19:43:44 +0100

Hello,

Running Alpine 3.11, I have a few fonts including terminus in
/usr/share/consolefonts.

I've been using them since several years on my hidpi laptop but I'm
unable to set them on Alpine, I can't figure out why.

# ls /usr/share/consolefonts/ter-2* 
/usr/share/consolefonts/ter-212n.psf.gz  /usr/share/consolefonts/ter-
218b.psf.gz  /usr/share/consolefonts/ter-
222n.psf.gz  /usr/share/consolefonts/ter-232b.psf.gz
/usr/share/consolefonts/ter-214b.psf.gz  /usr/share/consolefonts/ter-
218n.psf.gz  /usr/share/consolefonts/ter-
224b.psf.gz  /usr/share/consolefonts/ter-232n.psf.gz
/usr/share/consolefonts/ter-214n.psf.gz  /usr/share/consolefonts/ter-
220b.psf.gz  /usr/share/consolefonts/ter-224n.psf.gz
/usr/share/consolefonts/ter-216b.psf.gz  /usr/share/consolefonts/ter-
220n.psf.gz  /usr/share/consolefonts/ter-228b.psf.gz
/usr/share/consolefonts/ter-216n.psf.gz  /usr/share/consolefonts/ter-
222b.psf.gz  /usr/share/consolefonts/ter-228n.psf.gz

If I try to change font from tty setfont complains that the font isn't
available:

# setfont ter-212n
setfont: ter-212n: No such file or directory

What do I miss?

Cheers,

-- 
David

---

From: Hilix <[email-masked]>
Date: Fri, 24 Jan 2020 11:44:51 +0100

Hello David,

 From the command line, you have to use setfont with the full path to the font:
# setfont /usr/share/consolefonts/ter-212n.psf.gz

You can also switch to this font during system boot:

1. Change the consolefont in /etc/config.d/consolefont

from:
consolefont="default8x16.psf.gz"
to:
consolefont="ter-212n.psf.gz"

2. Add the consolefont-"service"

# rc-update add consolefont

3. Test:

# rc-service consolefont start

or reboot the system.

Hope this helps. Regards. / Hilmar.

---

From: David Demelier <[email-masked]>
Date: Sat, 25 Jan 2020 14:55:57 +0100

> # setfont /usr/share/consolefonts/ter-212n.psf.gz

Thanks for your answer, so I guess the busybox's setfont require
explicit full path rather than one provided by util-linux (IIRC).

> # rc-update add consolefont

I've added it to boot.

Regards

-- 
David