Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

wsfontload(8) [netbsd man page]

WSFONTLOAD(8)						    BSD System Manager's Manual 					     WSFONTLOAD(8)

NAME
wsfontload -- load a font bitmap into the wsfont pool or a wscons display device SYNOPSIS
wsfontload [-Bbv] [-e encoding] [-f wsdev] [-h height] [-N name] [-w width] [fontfile] DESCRIPTION
The wsfontload 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 fontfile, or from standard input if fontfile is not provided. The options are: -B Specifies that the font data is ordered right-to-left byte wise. The default is left-to-right. -b Specifies that the font data is ordered right-to-left bit wise. The default is left-to-right. -e encoding Sets the encoding of the font. This can be either a symbolic abbreviation or a numeric value. Currently recognized abbrevia- tions are: 'iso' ISO-8859-1 encoding 'ibm' IBM encoded fonts 'pcvt' the custom encoding of the supplemental fonts which came with the BSD ``pcvt'' console driver 'iso2' ISO-8859-2 (east european) encoding 'iso7' ISO-8859-7 (greek) encoding 'koi8r' KOI8-R (russian) encoding Per default, 'iso' is assumed. -f wsdev Specify the device to operate on. Default is /dev/wsfont. -h height Sets the height of a font character in pixels. Default is 16. -N name Specifies a name which can be used later to refer to the font. If none is given, the fontfile name is used to create one. -v Prints the font's properties before loading it. -w width Sets the width of a font character in pixels. Default is 8. Typically, the wsfontload utility will be executed in system startup by the /etc/rc.d/wscons script, controlled by the /etc/wscons.conf con- figuration file. FILES
/etc/wscons.conf /usr/share/wscons/fonts EXAMPLES
wsfontload -N myname -h 8 -e ibm /usr/share/wscons/fonts/vt220l.808 Load the IBM-encoded 8x8-font from the wscons(4) distribution. This (or another 8x8-font) is necessary to use the 50-line screen type on vga(4) displays. wsfontload -N orator -e ibm /usr/share/wscons/fonts/orator.816 wsconsctl -dw font=orator Load the ``orator'' IBM-encoded 8x16 font and switch the first console screen (ttyE0, wsconsctl's default) to this alternate font. SEE ALSO
wscons(4), wsconscfg(8), wsconsctl(8) BUGS
Many features are missing. There is no way to remove a loaded font. BSD
May 4, 2003 BSD

Check Out this Related Man Page

WSFONT(9)						   BSD Kernel Developer's Manual						 WSFONT(9)

NAME
wsfont, wsfont_init, wsfont_matches, wsfont_find, wsfont_add, wsfont_remove, wsfont_enum, wsfont_lock, wsfont_unlock, wsfont_map_unichar -- wscons font support SYNOPSIS
#include <dev/wscons/wsconsio.h> #include <dev/wsfont/wsfont.h> void wsfont_init(void); int wsfont_matches(struct wsdisplay_font *font, const char *name, int width, int height, int stride, int flags); int wsfont_find(const char *name, int width, int height, int stride, int bitorder, int byteorder, int flags); int wsfont_add(struct wsdisplay_font *font, int copy); int wsfont_remove(int cookie); void wsfont_enum(void (*callback)(const char *, int, int, int)); int wsfont_lock(int cookie, struct wsdisplay_font **ptr); int wsfont_unlock(int cookie); int wsfont_map_unichar(struct wsdisplay_font *font, int c); DESCRIPTION
The wsfont module is a component of the wscons(9) framework to provide access to display fonts. Fonts may be loaded dynamically into the kernel or included statically in the kernel at compile time. Display drivers which emulate a glass-tty console on a bit-mapped display can add, remove and find fonts for use by device-dependent blitter operations. The primary data type for manipulating fonts is the wsdisplay_font structure in dev/wscons/wsconsio.h: struct wsdisplay_font { const char *name; /* font name */ int firstchar; int numchars; /* size of font table */ int encoding; /* font encoding */ u_int fontwidth; /* character width */ u_int fontheight; /* character height */ u_int stride; int bitorder; int byteorder; void *data; /* pointer to font table */ }; The maximum font table size is WSDISPLAY_MAXFONTSZ. The wsfont framework supports fonts with the following encodings: WSDISPLAY_FONTENC_ISO ISO-encoded fonts. WSDISPLAY_FONTENC_IBM IBM-encoded fonts commonly available for IBM CGA, EGA and VGA display adapters. WSDISPLAY_FONTENC_PCVT PCVT-encoding fonts distributed as part of the old PCVT terminal emulation driver. WSDISPLAY_FONTENC_ISO7 ISO-encoded Greek fonts. WSDISPLAY_FONTENC_ISO2 ISO-encoded East European fonts. FUNCTIONS
wsfont_init(void) Initialise the font list with the built-in fonts. wsfont_matches(font, name, width, height, stride) Matches the font font with the specifications name, width, height, stride and flags. Return zero if not matched and non-zero if matched. The flags parameter has the same meaning as in wsfont_find(). wsfont_find(name, width, height, stride, bitorder, byteorder, flags) Find the font called name from the fonts loaded into the kernel. The font aspect is specified by width, height, and stride. If wsfont_find() is called with any of the parameters as 0, it indicates that we don't care about that aspect of the font. If the font is found, a (nonnegative-valued) cookie is returned which can be used with the other functions. The bitorder and byteorder arguments are the bit order and byte order required. Valid values are: WSDISPLAY_FONTORDER_KNOWN The font is in known ordered format and doesn't need converting. WSDISPLAY_FONTORDER_L2R The font is ordered left to right. WSDISPLAY_FONTORDER_R2L The font is ordered right to left. The flags parameter determines what type of font can be returned. Any combination of the following values is allowed: WSFONT_FIND_BITMAP To search bitmap fonts, WSFONT_FIND_ALPHA to search anti-aliased fonts. When more flexibility is required, wsfont_enum() should be used. wsfont_add(font, copy) Add a font font to the font list. If the copy argument is non-zero, then the font is physically copied, otherwise a reference to the original font is made. wsfont_remove(cookie) Remove the font specified by cookie from the font list. The value of cookie was returned by wsfont_add(). wsfont_enum(callback) Enumerate the list of fonts. For each font in the font list, the callback function argument is called with the arguments specifying the font name, width, height and stride. wsfont_lock(cookie, ptr) Lock access to the font specified by cookie so that it cannot be unloaded from the kernel while is being used. If the bit or byte order of the font to be locked differs from what has been requested with wsfont_find() then the glyph data will be modified to match. At this point it may be necessary for wsfont_lock() to make a copy of the font data; this action is transparent to the call- er. A later call to wsfont_unlock() will free resources used by temporary copies. The address of the wsdisplay_font pointer for the specified font is returned in the ptr argument. wsfont_lock() returns zero on success, or an error code on failure. wsfont_unlock(cookie) Unlock the font specified by cookie. Returns zero on success, or an error code on failure. wsfont_map_unichar(font, c) Remap the unicode character c to glyph for font font. Returns the glyph on success or -1 on error. CODE REFERENCES
The wscons subsystem is implemented within the directory sys/dev/wscons. The wsfont subsystem itself is implemented within the file sys/dev/wsfont/wsfont.c. SEE ALSO
wsfont(4), wsfontload(8), autoconf(9), driver(9), intro(9), wscons(9), wsdisplay(9) BSD
January 13, 2012 BSD
Man Page