File: ch1.html

package info (click to toggle)
console-setup 1.245
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 62,488 kB
  • sloc: perl: 11,225; xml: 8,643; sh: 3,902; makefile: 778
file content (191 lines) | stat: -rw-r--r-- 5,686 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

<html>

<head>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">

<title>The Hackers Guide for console-setup - Basic Structure</title>

<link href="index.html" rel="start">
<link href="index.html" rel="prev">
<link href="ch2.html" rel="next">
<link href="index.html#contents" rel="contents">
<link href="index.html#copyright" rel="copyright">
<link href="ch1.html" rel="chapter" title="1 Basic Structure">
<link href="ch2.html" rel="chapter" title="2 bdf2psf">
<link href="ch3.html" rel="chapter" title="3 The Legacy Fonts">
<link href="ch4.html" rel="chapter" title="4 The New Fonts">
<link href="ch-ckbcomp.html" rel="chapter" title="5 The ckbcomp Utility">
<link href="ch1.html#s1.1" rel="section" title="1.1 Fonts">
<link href="ch1.html#s1.2" rel="section" title="1.2 Keyboard">
<link href="ch1.html#s1.3" rel="section" title="1.3 describe_unicodes">
<link href="ch2.html#s2.1" rel="section" title="2.1 Synopsis">
<link href="ch2.html#s-charsets" rel="section" title="2.2 Character Sets">
<link href="ch2.html#s-equivalence" rel="section" title="2.3 Equivalence files">
<link href="ch3.html#s3.1" rel="section" title="3.1 Conversion from PSF to BDF">
<link href="ch3.html#s3.2" rel="section" title="3.2 Back Conversion&mdash;from BDF to PSF">

</head>

<body>

<p><a name="ch1"></a></p>
<hr>

<p>
[ <a href="index.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ 1 ]
[ <a href="ch2.html">2</a> ]
[ <a href="ch3.html">3</a> ]
[ <a href="ch4.html">4</a> ]
[ <a href="ch-ckbcomp.html">5</a> ]
[ <a href="ch2.html">next</a> ]
</p>

<hr>

<h1>
The Hackers Guide for <samp>console-setup</samp>
<br>Chapter 1 - Basic Structure
</h1>

<hr>

<p>
The main directory of the package contains a very simple <code>Makefile</code>
&mdash; its main purpose is to invoke the sub-<code>Makefile</code>s in the
directories <code>Fonts</code> and <code>Keyboard</code>.
</p>

<hr>

<h2 id="s1.1">1.1 Fonts</h2>

<p>
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.
</p>

<p>
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.
</p>

<p>
The new console fonts are named after the scheme
<var>CHARSET</var>-<var>FONTFACE</var>.psf, <var>CHARSET</var> may be for
example Arabic, CyrAsia or Lat38 (see <a href="ch2.html#s-charsets">Character
Sets, Section 2.2</a>) and <var>FONTFACE</var> can be for example Fixed16.  The
number in <var>FONTFACE</var> represents the number of scan lines in the font.
</p>

<hr>

<h2 id="s1.2">1.2 Keyboard</h2>

<p>
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.
</p>

<p>
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.
</p>

<p>
In order to circumvent we use the <code>ckbcomp</code> utility which is able to
translate the keyboard definitions used in X Window to keyboard definitions
suitable for loadkeys.  See <a href="ch-ckbcomp.html">The <code>ckbcomp</code>
Utility, Chapter 5</a>.
</p>

<p>
The <code>compose_translator</code> program generates the compose sequences
from the console.  Invocation:
</p>

<pre>
     ./compose_translator --acm acm/<var>ENCODING</var>.acm locale/<var>X_ENCODING</var>/Compose
</pre>

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

<hr>

<h2 id="s1.3">1.3 <code>describe_unicodes</code></h2>

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

<pre>
     $ 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
</pre>

<p>
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.
</p>

<hr>

<p>
[ <a href="index.html">previous</a> ]
[ <a href="index.html#contents">Contents</a> ]
[ 1 ]
[ <a href="ch2.html">2</a> ]
[ <a href="ch3.html">3</a> ]
[ <a href="ch4.html">4</a> ]
[ <a href="ch-ckbcomp.html">5</a> ]
[ <a href="ch2.html">next</a> ]
</p>

<hr>

<p>
The Hackers Guide for <samp>console-setup</samp>
</p>

<address>
Anton Zinoviev <code><a href="mailto:anton@lml.bas.bg">mailto:anton@lml.bas.bg</a></code><br>
<br>
</address>
<hr>

</body>

</html>