This commit was generated by cvs2svn to track changes on a CVS vendor
[unix-history] / usr.sbin / keymap / lib / vgafont.5
CommitLineData
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
31This document describes the differences between the font format loadable by
32the
33.Xr setfont 3
34routine and the original bdf (bitmap distribution format) as used by
35the X11 Windows System Release 5.
36.Pp
37In general,
38.Fn setfont
39understands all keywords of the bdf file, but only uses a subset of them.
40.Pp
41The main restriction for usability of fonts is that the console is
42operated in text mode whereas the X11 Windows system uses
43graphics to display a character. Thus, a usable
44font underlies the following limits:
45.Pp
46.Bl -enum -compact
47.It
48The bitmap of a character must be smaller than 8x16. Note that this fits for
49a 3x5 font for instance; it is, however, not recommended to load such small
50fonts, because this font is displayed in a 8x16 pixel map anyway, and thus
51might look quite funny.
52.It
53The font should have fixed width, however, proportional fonts may be
54loaded into the fixed grid, but look quite ugly then.
55.It
56A character set may contain a maximum of 256 entries. Together with the
57facility of the console driver to load two fonts, there may be 512 different
58characters displayed simultaneously. This is sufficient for most
59latin character sets (if you want to do word processing or TeX, use a
60graphical video system).
61.It
62X11 uses a 16 bit encoding scheme similiar to the ISO 10646-1 Draft standard
63to express a character code. 386bsd is currently based on a 8 bit scheme.
64To allow more than 256 character codes and retaining 8 bit compatibility,
65the console driver uses a pair of special codes to switch between fonts.
66The code
67.Em 0x0e (SO)
68enables the second font, the code
69.Em 0x0f (SI)
70switches back to the first (default) font. If no second font is loaded,
71SI and SO are ignored.
72.Pp
73This handling of fonts and encoding is experimental, and may be modified
74in the future, if a better scheme (UniCode, or ISO-DIS 10646 1.2) is
75available and standardized.
76.Pp
77.Sh EXAMPLE
78The following is a sample bdf font skeleton which is accepted by
79.Fn setfont .
80It should not be misunderstood as an official description of the bdf font
81format.
82.Pp
83.Bd -literal
84COMMENT This is a comment and may occur anywhere
85STARTFONT 2.1 ignored
86FONT vga ignored
87SIZE 16 75 75 first number used as box length
88FONTBOUNDINGBOX 8 16 0 -4 first two numbers used as box size
89STARTPROPERTIES 3 ignored
90FONT_DESCENT 4 ignored
91FONT_ASCENT 12 ignored
92DEFAULT_CHAR 0 used to fill empty slots
93ENDPROPERTIES used
94CHARS 256 used
95STARTCHAR C0000 ignored
96ENCODING 0 used
97SWIDTH 666 0 ignored
98DWIDTH 8 0 ignored
99BBX 8 16 0 -4 used
100BITMAP used
10100 bitmap must fit length and width
10200
10300
1047c
105c6
106c6
107de
108de
109de
110dc
111c0
1127c
11300
11400
11500
11600
117ENDCHAR used
118... Startchar-Endchar repeated
119ENDFONT used
120.Ed
121.Pp
122.Sh Files
123.Bl -tag -width *.bdf -compact
124.It Pa *.bdf
125bdf font file
126.El
127.Sh SEE ALSO
128.Xr co 4 ,
129.Xr keycap 5
130.Sh HISTORY
131The bdf font format is part of the MIT X11 distribution.
132.Sh BUGS
133The problem of languages writing right-to-left is not yet handled. Currently,
134words in such a language must be prepared as an inverse character string.