Reloading console font

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:
http://bkhome.org/fossil/woof2.cgi/info/7d52a93d7b

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.


Posted on 1 Mar 2012, 16:07


Comments:

Posted on 1 Mar 2012, 18:26 by Iguleder1
Console fonts
Barry - why is this needed? Here's the code that sets the console font in my distro - works perfectly and persistent.

# 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"



Posted on 1 Mar 2012, 19:06 by BarryK
Re console font
Iguleder1,
Where are you doing that?

We set the console font in say rc.country, 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.



Posted on 2 Mar 2012, 4:02 by L18L
re re consolefont
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:
setfont /lib/consolefonts/LatGrkCyr-8x16.psfu.gz -C /dev/tty1


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.