site  contact  subhomenews

Reloading console font

March 01, 2012 — BarryK
L18L has been investigating this. It seems that we need to reload the console font every time there is an exit from X. This never bothered us before, as we were only using the kernel's inbuilt font -- and 'en' locale continues to use it. This issue affects those non_English locales that are using a different console font.

I think that I have got it all figured out. See latest Woof commit:

The scripts that pertain to this console font issue are:

rc.sysinit, xorgwizard, xwin, quicksetup, load_consolefont

That last one, /sbin/load_consolefont, is a new script that is now called by a few other scripts.

There is bit of a cosmetic problem when booting. If the initrd.gz has not been converted to the non-English locale, then rc.sysinit changes font and the earlier o/p made by the 'init' script changes into partial garbage. It might be necessary to detect that situation in rc.sysinit and clear the screen before loading the font.


Console fonts
Username: Iguleder1
Barry - why is this needed? Here's the code that sets the console font in my distro - works perfectly and persistent. [code]# set the console font echo -n "Setting the console font ..." for i in 1 2 3 4 do setfont /usr/share/kbd/consolefonts/$CONSOLE_FONT -C /dev/tty$i done echo " done"[/code]

Re console font
Username: BarryK
"Iguleder1, Where are you doing that? We set the console font in say, but when exit from X, it is lost and there is reversion to kernel default font. This also happens in xorgwizard when X is tested. Both L18L and I have observed this phenomenon independently.

re re consolefont
Username: L18L
"Viewing /sbin/load_consolefont and Igulederīs comment here my idea for further improvement: setfont alone should be sufficient, no need for loadfont. (smaller busybox) I had used loadfont just because in that version of initrd.gz setfont had not been enabled. Now it is and loadfont is superfluos. I have been repeating my test using setfont instead of loadfont now insert before line 334 of xorgwizard: [code]setfont /lib/consolefonts/LatGrkCyr-8x16.psfu.gz -C /dev/tty1[/code] Note, this has be done for just /dev/tty1. Running xorgwizard from CONTROL-ALT-F3 which surely is not /dev/tty1 has displayed everything correctly.

Tags: woof