[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ next ]


The Hackers Guide for console-setup
Chapter 1 - Basic Structure


The main directory of the package contains a very simple Makefile — its main purpose is to invoke the sub-Makefiles in the directories Fonts and Keyboard.


1.1 Fonts

Only 256 (or 512) glyphs can be used in the console fonts. Because of that it is impossible to use one universal font suitable for all languages. So we have to support different font collections for the different languages.

Maintaining many different font collections has some obious disadvantages. First, the look of the console will depend on the character set. Second, it is difficult to follow the quality and the purpose of so many different fonts. The solution is to maintain common fonts in BDF format for all languages and translate them to many fonts in PSF format for the different character sets.

The new console fonts are named after the scheme CHARSET-FONTFACE.psf, CHARSET may be for example Arabic, CyrAsia or Lat38 (see Character Sets, Section 2.2) and FONTFACE can be for example Fixed16. The number in FONTFACE represents the number of scan lines in the font.


1.2 Keyboard

The traditional approach for the keyboard support of Linux is not flexible enough. All keyboard tables are fixed so even small customizations of the keyboard layouts require completely new keyboard definition. As a result for many of the keyboard layouts there are many variants that differ only a bit.

Another disadvantage is that the keyboard mappings are not completely encoding independent. The kernel does not have knowledge for all Unicode symbols and can not translate between Unicode and the legacy 8-bit encodings.

In order to circumvent we use the ckbcomp utility which is able to translate the keyboard definitions used in X Window to keyboard definitions suitable for loadkeys. See The ckbcomp Utility, Chapter 5.

The compose_translator program generates the compose sequences from the console. Invocation:

     ./compose_translator --acm acm/ENCODING.acm locale/X_ENCODING/Compose

Here the file in the acm directory defines the encoding of the generated compose sequences and the file in the locale defines the compose sequences in X Window. The locale directory is a copy of the X directory /usr/X11R6/lib/X11/locale.


1.3 describe_unicodes

The main directory contains the utility describe_unicodes. This utility is never invoked automatically. Its purpose is to make files containing many Unicodes more human-readable. The following transcript illustrates its usage:

     $ cat foo
     U+FFFD U+003F
     U+2015 U+2014
     U+02C9 U+00AF
     $ ./describe_unicodes foo
     $ cat foo
     U+FFFD U+003F
     # U+FFFD:   REPLACEMENT CHARACTER
     # U+003F:   QUESTION MARK
     U+2015 U+2014
     # U+2015:   HORIZONTAL BAR
     # U+2014:   EM DASH
     U+02C9 U+00AF
     # U+02C9:   MODIFIER LETTER MACRON
     # U+00AF:   MACRON

This utility is idempotent, i.e. you can use it as many times as necessary on one and the same file in order to update the comments.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ next ]


The Hackers Guide for console-setup

Anton Zinoviev anton@lml.bas.bg