xref: /netbsd-src/usr.sbin/wsfontload/wsfontload.8 (revision d16b7486a53dcb8072b60ec6fcb4373a2d0c27b7)
1.\"	$NetBSD: wsfontload.8,v 1.32 2022/06/08 22:38:29 uwe Exp $
2.\"
3.\" Copyright (c) 1999, 2001
4.\" 	Matthias Drochner.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25.\" SUCH DAMAGE.
26.\"
27.Dd June 9, 2022
28.Dt WSFONTLOAD 8
29.Os
30.Sh NAME
31.Nm wsfontload
32.Nd "load a font bitmap into the wsfont pool or a wscons display device"
33.Sh SYNOPSIS
34.Nm
35.Op Fl Bbv
36.Op Fl e Ar encoding
37.Op Fl f Ar wsdev
38.Op Fl h Ar height
39.Op Fl N Ar name
40.Op Fl w Ar width
41.Op Ar fontfile
42.Nm
43.Fl l
44.Sh DESCRIPTION
45The
46.Nm
47utility loads a font bitmap into the wsfont font pool
48(or a wscons device if the device driver supports this).
49The font gets assigned a name in this process which it can be referred to
50by later for use on a display screen.
51The font is loaded from the specified
52.Ar fontfile ,
53or from standard input if
54.Ar fontfile
55is not provided.
56.Pp
57The options are:
58.Bl -tag -width Fl
59.It Fl B
60Specifies that the font data is ordered right-to-left byte wise.
61The default is left-to-right.
62.It Fl b
63Specifies that the font data is ordered right-to-left bit wise.
64The default is left-to-right.
65.It Fl e Ar encoding
66Sets the encoding of the font.
67This can be either a symbolic name or a numeric value.
68Currently recognized names are:
69.Bl -tag -width Ql
70.It Ql iso
71ISO-8859-1 encoding
72.It Ql ibm
73IBM CP437 encoding
74.It Ql pcvt
75the custom encoding of the supplemental fonts which came with the
76.Bx
77.Dq pcvt
78console driver
79.It Ql iso2
80ISO-8859-2 (Eastern European) encoding
81.It Ql iso7
82ISO-8859-7 (Greek) encoding
83.It Ql koi8r
84KOI8-R (Russian) encoding
85.El
86.Pp
87Per default,
88.Ql iso
89is assumed.
90.It Fl f Ar wsdev
91Specify the device to operate on.
92Default is
93.Pa /dev/wsfont .
94.It Fl h Ar height
95Sets the height of a font character in pixels.
96Default is 16.
97.It Fl l
98Print a list of fonts that have been loaded or are built-in to the kernel.
99.It Fl N Ar name
100Specifies a name which can be used later to refer to the font.
101If none is given, the
102.Ar fontfile
103name is used to create one.
104.It Fl v
105Prints the font's properties before loading it.
106.It Fl w Ar width
107Sets the width of a font character in pixels.
108Default is 8.
109.El
110.Pp
111.Nm
112supports
113.Ql \&.wsf
114file format that contains the necessary information about the font in
115the font file itself.
116Such files can be loaded without specifying any arguments,
117though
118.Fl N
119can be used to override the font name.
120.Pp
121Typically, the
122.Nm
123utility will be executed during system startup by the
124.Xr rc 8
125script.
126See
127.Xr wscons.conf 5 .
128.Sh FILES
129.Bl -item -compact
130.It
131.Pa /usr/share/wscons/fonts
132.El
133.Sh EXAMPLES
134Load ISO-encoded 20-pixel high Terminus font
135and use it on the current console
136.Pp
137.Bd -literal -offset indent
138# wsfontload /usr/share/wscons/fonts/ter-120n.wsf
139# wsfontload -l | grep Terminus
140Terminus20-ISO8859-1 10x20
141# wsconsctl -f `tty` -dw font=Terminus20-ISO8859-1
142.Ed
143.Pp
144Load the ISO-encoded 16\[tmu]32 Spleen font
145and switch the first console screen to use it:
146.Pp
147.Bd -literal -offset indent
148# wsfontload -w 16 -h 32 -e iso -N spleen32 \e
149	/usr/share/wscons/fonts/spleen-16x32.fnt
150# wsconsctl -dw font=spleen32
151.Ed
152.Pp
153Load the IBM-encoded 8\[tmu]8-font from the
154.Xr wscons 4
155distribution:
156.Pp
157.Bd -literal -offset indent
158# wsfontload -N myname -h 8 -e ibm \e
159    /usr/share/wscons/fonts/vt220l.808
160.Ed
161.Pp
162This or another 8\[tmu]8-font is necessary to use the
16350-line screen type on
164.Xr vga 4
165displays.
166.Sh SEE ALSO
167.Xr wscons 4 ,
168.Xr wsfont 4 ,
169.Xr wscons.conf 5 ,
170.\" XXX: BUGS: not yet
171.\" .Xr wsf 5 ,
172.Xr wsconsctl 8
173.Sh HISTORY
174Support for
175.Ql \&.wsf
176font files appeared in
177.Nx 10.0 .
178.Sh BUGS
179Many features are missing.
180.Pp
181The
182.Ql \&.wsf
183file format is undocumented.
184.Pp
185There is no way to remove a loaded font.
186