Commit | Line | Data |
---|---|---|
15637ed4 RG |
1 | .\" Contributed to 386bsd 0.1 and later versions |
2 | .\" | |
3 | .\" Copyright 1992 by Holger Veit | |
4 | .\" May be freely used with Bill Jolitz's port of | |
5 | .\" 386bsd and may be included in a 386bsd collection | |
6 | .\" as long as binary and source are available and reproduce the above | |
7 | .\" copyright. | |
8 | .\" | |
9 | .\" You may freely modify this code and contribute improvements based | |
10 | .\" on this code as long as you don't claim to be the original author. | |
11 | .\" Commercial use of this source requires permittance of the copyright | |
12 | .\" holder. A general license for 386bsd will override this restriction. | |
13 | .\" | |
14 | .\" Use at your own risk. The copyright holder or any person who makes | |
15 | .\" this code available for the public (administrators of public archives | |
16 | .\" for instance) are not responsible for any harm to hardware or software | |
17 | .\" that might happen due to wrong application or program faults. | |
18 | .\" | |
19 | .\" You must have the codriver driver in the same package generated | |
20 | .\" into the 386bsd kernel, otherwise this program does not work. | |
21 | .\" | |
22 | .\" @(#)vgafont.5 1.0 (contributed to 386bsd) 10/25/92 | |
23 | .\" | |
24 | .Dd October 25, 1992 | |
25 | .Dt CONSOLE 5 | |
26 | .Os | |
27 | .Sh NAME | |
28 | .Nm vgafont | |
29 | .Nd setfont bdf font format | |
30 | .Sh DESCRIPTION | |
31 | This document describes the differences between the font format loadable by | |
32 | the | |
33 | .Xr setfont 3 | |
34 | routine and the original bdf (bitmap distribution format) as used by | |
35 | the X11 Windows System Release 5. | |
36 | .Pp | |
37 | In general, | |
38 | .Fn setfont | |
39 | understands all keywords of the bdf file, but only uses a subset of them. | |
40 | .Pp | |
41 | The main restriction for usability of fonts is that the console is | |
42 | operated in text mode whereas the X11 Windows system uses | |
43 | graphics to display a character. Thus, a usable | |
44 | font underlies the following limits: | |
45 | .Pp | |
46 | .Bl -enum -compact | |
47 | .It | |
48 | The bitmap of a character must be smaller than 8x16. Note that this fits for | |
49 | a 3x5 font for instance; it is, however, not recommended to load such small | |
50 | fonts, because this font is displayed in a 8x16 pixel map anyway, and thus | |
51 | might look quite funny. | |
52 | .It | |
53 | The font should have fixed width, however, proportional fonts may be | |
54 | loaded into the fixed grid, but look quite ugly then. | |
55 | .It | |
56 | A character set may contain a maximum of 256 entries. Together with the | |
57 | facility of the console driver to load two fonts, there may be 512 different | |
58 | characters displayed simultaneously. This is sufficient for most | |
59 | latin character sets (if you want to do word processing or TeX, use a | |
60 | graphical video system). | |
61 | .It | |
62 | X11 uses a 16 bit encoding scheme similiar to the ISO 10646-1 Draft standard | |
63 | to express a character code. 386bsd is currently based on a 8 bit scheme. | |
64 | To allow more than 256 character codes and retaining 8 bit compatibility, | |
65 | the console driver uses a pair of special codes to switch between fonts. | |
66 | The code | |
67 | .Em 0x0e (SO) | |
68 | enables the second font, the code | |
69 | .Em 0x0f (SI) | |
70 | switches back to the first (default) font. If no second font is loaded, | |
71 | SI and SO are ignored. | |
72 | .Pp | |
73 | This handling of fonts and encoding is experimental, and may be modified | |
74 | in the future, if a better scheme (UniCode, or ISO-DIS 10646 1.2) is | |
75 | available and standardized. | |
76 | .Pp | |
77 | .Sh EXAMPLE | |
78 | The following is a sample bdf font skeleton which is accepted by | |
79 | .Fn setfont . | |
80 | It should not be misunderstood as an official description of the bdf font | |
81 | format. | |
82 | .Pp | |
83 | .Bd -literal | |
84 | COMMENT This is a comment and may occur anywhere | |
85 | STARTFONT 2.1 ignored | |
86 | FONT vga ignored | |
87 | SIZE 16 75 75 first number used as box length | |
88 | FONTBOUNDINGBOX 8 16 0 -4 first two numbers used as box size | |
89 | STARTPROPERTIES 3 ignored | |
90 | FONT_DESCENT 4 ignored | |
91 | FONT_ASCENT 12 ignored | |
92 | DEFAULT_CHAR 0 used to fill empty slots | |
93 | ENDPROPERTIES used | |
94 | CHARS 256 used | |
95 | STARTCHAR C0000 ignored | |
96 | ENCODING 0 used | |
97 | SWIDTH 666 0 ignored | |
98 | DWIDTH 8 0 ignored | |
99 | BBX 8 16 0 -4 used | |
100 | BITMAP used | |
101 | 00 bitmap must fit length and width | |
102 | 00 | |
103 | 00 | |
104 | 7c | |
105 | c6 | |
106 | c6 | |
107 | de | |
108 | de | |
109 | de | |
110 | dc | |
111 | c0 | |
112 | 7c | |
113 | 00 | |
114 | 00 | |
115 | 00 | |
116 | 00 | |
117 | ENDCHAR used | |
118 | ... Startchar-Endchar repeated | |
119 | ENDFONT used | |
120 | .Ed | |
121 | .Pp | |
122 | .Sh Files | |
123 | .Bl -tag -width *.bdf -compact | |
124 | .It Pa *.bdf | |
125 | bdf font file | |
126 | .El | |
127 | .Sh SEE ALSO | |
128 | .Xr co 4 , | |
129 | .Xr keycap 5 | |
130 | .Sh HISTORY | |
131 | The bdf font format is part of the MIT X11 distribution. | |
132 | .Sh BUGS | |
133 | The problem of languages writing right-to-left is not yet handled. Currently, | |
134 | words in such a language must be prepared as an inverse character string. |