.\" $NetBSD: wsfontload.8,v 1.32 2022/06/08 22:38:29 uwe Exp $ .\" .\" Copyright (c) 1999, 2001 .\" Matthias Drochner. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd June 9, 2022 .Dt WSFONTLOAD 8 .Os .Sh NAME .Nm wsfontload .Nd "load a font bitmap into the wsfont pool or a wscons display device" .Sh SYNOPSIS .Nm .Op Fl Bbv .Op Fl e Ar encoding .Op Fl f Ar wsdev .Op Fl h Ar height .Op Fl N Ar name .Op Fl w Ar width .Op Ar fontfile .Nm .Fl l .Sh DESCRIPTION The .Nm utility loads a font bitmap into the wsfont font pool (or a wscons device if the device driver supports this). The font gets assigned a name in this process which it can be referred to by later for use on a display screen. The font is loaded from the specified .Ar fontfile , or from standard input if .Ar fontfile is not provided. .Pp The options are: .Bl -tag -width Fl .It Fl B Specifies that the font data is ordered right-to-left byte wise. The default is left-to-right. .It Fl b Specifies that the font data is ordered right-to-left bit wise. The default is left-to-right. .It Fl e Ar encoding Sets the encoding of the font. This can be either a symbolic name or a numeric value. Currently recognized names are: .Bl -tag -width Ql .It Ql iso ISO-8859-1 encoding .It Ql ibm IBM CP437 encoding .It Ql pcvt the custom encoding of the supplemental fonts which came with the .Bx .Dq pcvt console driver .It Ql iso2 ISO-8859-2 (Eastern European) encoding .It Ql iso7 ISO-8859-7 (Greek) encoding .It Ql koi8r KOI8-R (Russian) encoding .El .Pp Per default, .Ql iso is assumed. .It Fl f Ar wsdev Specify the device to operate on. Default is .Pa /dev/wsfont . .It Fl h Ar height Sets the height of a font character in pixels. Default is 16. .It Fl l Print a list of fonts that have been loaded or are built-in to the kernel. .It Fl N Ar name Specifies a name which can be used later to refer to the font. If none is given, the .Ar fontfile name is used to create one. .It Fl v Prints the font's properties before loading it. .It Fl w Ar width Sets the width of a font character in pixels. Default is 8. .El .Pp .Nm supports .Ql \&.wsf file format that contains the necessary information about the font in the font file itself. Such files can be loaded without specifying any arguments, though .Fl N can be used to override the font name. .Pp Typically, the .Nm utility will be executed during system startup by the .Xr rc 8 script. See .Xr wscons.conf 5 . .Sh FILES .Bl -item -compact .It .Pa /usr/share/wscons/fonts .El .Sh EXAMPLES Load ISO-encoded 20-pixel high Terminus font and use it on the current console .Pp .Bd -literal -offset indent # wsfontload /usr/share/wscons/fonts/ter-120n.wsf # wsfontload -l | grep Terminus Terminus20-ISO8859-1 10x20 # wsconsctl -f `tty` -dw font=Terminus20-ISO8859-1 .Ed .Pp Load the ISO-encoded 16\[tmu]32 Spleen font and switch the first console screen to use it: .Pp .Bd -literal -offset indent # wsfontload -w 16 -h 32 -e iso -N spleen32 \e /usr/share/wscons/fonts/spleen-16x32.fnt # wsconsctl -dw font=spleen32 .Ed .Pp Load the IBM-encoded 8\[tmu]8-font from the .Xr wscons 4 distribution: .Pp .Bd -literal -offset indent # wsfontload -N myname -h 8 -e ibm \e /usr/share/wscons/fonts/vt220l.808 .Ed .Pp This or another 8\[tmu]8-font is necessary to use the 50-line screen type on .Xr vga 4 displays. .Sh SEE ALSO .Xr wscons 4 , .Xr wsfont 4 , .Xr wscons.conf 5 , .\" XXX: BUGS: not yet .\" .Xr wsf 5 , .Xr wsconsctl 8 .Sh HISTORY Support for .Ql \&.wsf font files appeared in .Nx 10.0 . .Sh BUGS Many features are missing. .Pp The .Ql \&.wsf file format is undocumented. .Pp There is no way to remove a loaded font.