Choosing appropriate keymaps and fonts
Alexander E. Patrakov
patrakov at ums.usu.ru
Sun Sep 16 04:47:01 MDT 2007
Matthew Burgess wrote:
> Hi,
>
> How does one go about choosing the correct keymaps and fonts for their system? I've read over chapter07/console.html several times but still have a couple of questions.
>
> What I'm trying to do is configure a system to have a UK keymap and have a UTF-8 capable console. So far, I've got:
>
> UNICODE="1"
> KEYMAP="uk"
>
> However, as you'll note, unlike the Belgian keymap mentioned in the book, the UK keymap doesn't have a UTF-8 variant. I'm told I need to choose a LEGACY_CHARSET so that the bootscript will convert it to UTF-8 on the fly. The example for the ru_ms keymap is to convert the KOI8-R keymap, but I can't find any such keymap on my system.
>
> I think what is needed here is to look in /lib/kbd/consoletrans and pick a suitable [charset]_to_uni.trans file.
No, the character sets for converting the keymaps are built into the
"dumpkeys" program, and the full list is available in the "dumpkeys
--help" output.
> So, I think I need '8859-1' in my LEGACY_CHARSET variable, right?
>
No, iso-8859-1.
> If the above is correct, I think the following change might be suitable for the book:
>
> "There is no pre-made UTF-8 Russian keyamp, therefore it has to be produced by converting the existing KOI8-R keymap as illustrated below:"
>
> becomes
>
> "There is no pre-made UTF-8 Russian keyamp, therefore it has to be produced by converting the existing KOI8-R character set as illustrated below (available non-Unicode to Unicode character set mappings are available in /lib/kbd/consoletrans):"
>
No. Maybe: "There is no pre-made UTF-8 Russian keyamp, therefore it has
to be produced by converting the existing KOI8-R keymap as illustrated
below. Correct spelling for source character set names for the
LEGACY_CHARSET option are available in the dumpkeys --help output."
Or maybe move the "Correct spelling..." sentence to the description of
the LEGACY_CHARSET option description.
Basically, the reader has to know that the existing Russian keymap is
for KOI8-R users, and that the correct spelling of this character set
name for dumpkeys is "koi8-r".
And BTW, the next version of kbd does have a UTF-8 Russian keymap (as
"ru"), so we may need another example.
> Similarly, for fonts, how do I determine which ones are UTF-8 capable and what flags I need to pass to setfont, via the FONT variable, so that it will display correctly?
>
All *.psfu.gz fonts are supposed to be displayed correctly, because
every font has the screen font map in it that maps font positions to
Unicode (and in non-UTF-8 environments, the application charset map,
supploed via the -m switch, also matters - it maps application output
bytes to Unicode). However, there are a few fonts with a wrong screen
font map, e.g. lat2a-16.
The LiveCD defaults to the following for en_GB.UTF-8:
KEYMAP="uk"
UNICODE=1
BROKEN_COMPOSE=0
FONT="lat1-16 -m 8859-1" # Suboptimal - no Euro sign, and the -m
option was used only by the patched 2.6.16 kernel in LFS-6.2 (for dead
keys and composing)
LEGACY_CGARSET="iso-8859-1"
--
Alexander E. Patrakov
More information about the lfs-dev
mailing list