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 | .\" @(#)setfont.3 1.0 (contributed to 386bsd) 10/25/92 | |
23 | .\" | |
24 | .Dd October 25, 1992 | |
25 | .Dt CONSUTIL 3 | |
26 | .Os 386bsd 0.2 | |
27 | .Sh NAME | |
28 | .Nm setfont | |
29 | .Nd font loading support routine | |
30 | .Sh SYNOPSIS | |
31 | .Fd #include <sys/ioctl.h> | |
32 | .Fd #include <sys/ioctl_pc.h> | |
33 | .Fn setfont "const char *path" "int verbose" "int fpage" | |
34 | .Sh DESCRIPTION | |
35 | .Fn Setfont | |
36 | is the recommended high level interface to load fonts into the new style | |
37 | console driver | |
38 | .Xr co 4 . | |
39 | The | |
40 | .Fn setfont | |
41 | routine loads a bdf font (bitmap distribution format, | |
42 | as used by X11 Release 5), checks its validity, and then loads it | |
43 | into the console driver into the font page | |
44 | .Fa fpage . | |
45 | Currently, only pages 0 and 1 are valid. The argument | |
46 | .Fa verbose | |
47 | writes error messages, if any, to the | |
48 | .Dv stderr (see | |
49 | .Xr stdio 3 ) | |
50 | output. If | |
51 | .Fa verbose | |
52 | is 0, output is suppressed. | |
53 | .Sh RETURN VALUES | |
54 | On successful execution, | |
55 | .Fn setfont | |
56 | returns 0, otherwise -1 is returned, and the global variable | |
57 | .Va errno | |
58 | is set to hold the error code. | |
59 | .Sh ERRORS | |
60 | The following error codes are used: | |
61 | .Bl -tag -width Er | |
62 | .It Bq Er ENOENT | |
63 | The font file | |
64 | .Fa path could not be opened. | |
65 | .It Bq Er EFTYPE | |
66 | The file contains an improper or unsupported entry, or is not a bdf file. | |
67 | .It Bq Er EINVAL | |
68 | One of the parameters of a proper entry is not in an acceptable range, e.g. | |
69 | the bitmap is larger than 8x16 pixels. | |
70 | .El | |
71 | There are more error codes which are related to the failure of the | |
72 | .Dv VGASFNTMAP | |
73 | ioctl (see | |
74 | .Xr co 4 ). | |
75 | These errors occur with an improper configured or outdated kernel. | |
76 | .Pp | |
77 | .Sh FILES | |
78 | .Bl -tag -width *.bdf -compact | |
79 | .It Pa /usr/lib/libconsutil.a | |
80 | .Fl l Ar consutil | |
81 | library containing setfont | |
82 | .El | |
83 | .Sh SEE ALSO | |
84 | .Xr co 4 , | |
85 | .Xr vgafont 5 | |
86 | .Sh HISTORY | |
87 | The | |
88 | .Nm | |
89 | font loading function | |
90 | .Fn setfont | |
91 | is a new feature of the console driver | |
92 | .Xr co 4 | |
93 | of 386bsd 0.2 and later. |