#741874 cmatrix -l: fails to restore font: Cannot find default font

Package:
cmatrix
Source:
cmatrix
Description:
simulates the display from "The Matrix"
Submitter:
Jakub Wilk
Date:
2024-05-29 15:57:02 UTC
Severity:
important
#741874#3
Date:
2014-03-16 19:25:15 UTC
From:
To:
"cmatrix -l" changes the console font, but it fails to restore the
original one before it exits. I see this error message:

Cannot find default font

#741874#8
Date:
2014-03-16 20:39:05 UTC
From:
To:
$ cmatrix -l
Couldn't get a file descriptor referring to the console

#741874#11
Date:
2014-03-18 10:08:08 UTC
From:
To:
* Diego Fernández Durán <diego@goedi.net>, 2014-03-16, 21:39:

Did you run it from a Linux console?

#741874#16
Date:
2014-09-28 02:31:13 UTC
From:
To:
I get the same error after exiting cmatrix; Cannot find default font
and the terminal font is bold after exiting cmatrix.

I get the error both with and without cmatrix-xfonts if it matters

#741874#21
Date:
2015-05-09 18:20:27 UTC
From:
To:
It's been a while, but the "bug" seems to remain actual thus far.

If I got it right, cmatrix just calls `setfont` on exit, with no arguments so setfont tries to locate the default system font and apply it to the console.
According to setfont's manpage, it needs a file in /usr/share/consolefonts/ named default.ext or default8xSIZE.ext, where ext must be an approptiate extension for a font file (and SIZE seems to represent font's height, when it passed to setfont as the -N option's argument).

I found that there is no file named 'default' in the mentioned folder on my system, so I looked at /etc/default/console-setup and, keeping it's content in mind, created a symlink (as root, of course):

$ su
# ln -sv /usr/share/consolefonts/Lat15-Fixed16.psf.gz /usr/share/consolefonts/default.psf.gz

After it'd been done, setfont stopped reporting "Cannot find default font" and they lived happily ever after.
Hope it helps )