vga_gettextfont(3) [osf1 man page]
vga_gettextfont(3) Svgalib User Manual vga_gettextfont(3) NAME
vga_gettextfont, vga_puttextfont - get/set the font used in text mode SYNOPSIS
#include <vga.h> void vga_gettextfont(void *font); void vga_puttextfont(void *font); DESCRIPTION
The functions gives access to the buffer where svgalib saves the font used by the kernel. This is used by the restorefont(1), savetextmode(1), and textmode(1) utilities to restore a possibly screwed console font. The font buffer occupies 8192 bytes. However, versions 1.2.13 and later use a larger buffer internally and the size of the buffers passed to vga_gettextfont(3) and vga_puttextfont(3) can be set with vga_ext_set(3). The functions give access to the internal buffers of svgalib, not the font tables of the VGA card. This means that both functions must be called in graphics mode and a newly set font takes effect only at the next vga_setmode(TEXT) call. SEE ALSO
vga_setmode(3), vga_ext_set(3), svgalib(7), vgagl(7), libvga.config(5), restorefont(1), restoretextmode(1), restorepalette(1), savetextmode(1), textmode(1), vga_dumpregs(3), vga_gettextmoderegs(3), dumpreg(1) AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced function as well as of the original documentation is unknown. It is very likely that both are at least to some extent are due to Harm Hanemaayer <H.Hanemaayer@inter.nl.net>. Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections to this first version of the svgalib manual. Svgalib (>= 1.2.11) 27 July 1997 vga_gettextfont(3)
Check Out this Related Man Page
restorefont(1) Svgalib User Manual restorefont(1) NAME
restorefont - save or restore the SVGA font for textmode. SYNOPSIS
restorefont {-r|-w} filename DESCRIPTION
The font used by SVGA when in textmode is written to or restored from filename using the vga_gettextfont(3) and vga_puttextfont(3) func- tions. FILE FORMAT
The VGA font file filename has the following format: Offset: 0 - 31 Character 0 ... ... 8164 - 8195 Character 255 Each row of a character bitmap is stored as a byte (8 pixels). The space that is left from the 32-byte buffer for each character is ignored, e.g. a 16 line font uses only offsets 0 - 15 of each character. Linux textmode screen resolutions: 80x25 16 line font 400 scanlines 80x28 14 line font 400 scanlines 80x50 8 line font 400 scanlines The font sizes and resolutions of extended textmodes depend on the video card type and BIOS: 132x25 14 line font 350 scanlines (ugly) 132x25 16 line font 400 scanlines 132x43 8 line font 350 scanlines (use fix132x43 to fix/improve) 132x50 8 line font 400 scanlines Using a font that has less lines per character than the textmode works, but the characters are smaller. Using a font that is bigger than the textmode font results in the bottom part of characters being cut off. The svgalib distribution contains sample fonts with 8, 14 and 16 line characters in the files utils/font8, utils/font14, and utils/font16. The convfont (1) program can be used to convert fonts straightforwardly stored character-after-character (i.e. each character only uses 8/14/whatever bytes), to the 32-byte per character format that restorefont requires. The purpose of this program is usually to recover from a crashed console due to an svgalib, Xfree or other program bug. First save the state of the SVGA card when on a text console. After the crash restore this state. The savetextmode(1) and textmode(1) script makes this procedure very easy. The national/fontpak packages, which include kernel patches, allow different textmode fonts to be used in different virtual consoles. These have been superseded by the kbd package (in the kernel since ages). See the setfont(8) utility of the kbd package as a starting point. Recent kernels support up to 2 fonts with 512 chars each. Recent versions of svgalib take this into account and extend the size of the datafile accordingly. OPTIONS
-w filename write the font to the file filename. -r filename restore the font from the file filename. SEE ALSO
svgalib(7), vgagl(7), libvga.config(5), setfont(8), vga_gettextfont(3), vga_puttextfont(3), dumpreg(1), convfont(1), fix132x43(1), restore- textmode(1), restorepalette(1), runx(1), savetextmode(1), setmclk(1), textmode(1). AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced utility as well as of the original documentation is unknown. It is very likely that both are at least to some extent are due to Harm Hanemaayer <H.Hanemaayer@inter.nl.net>. Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections to this first version of the svgalib manual. Svgalib (>= 1.2.11) 2 Aug 1997 restorefont(1)