defrasterfont() — Silicon Graphics Beta Release
NAME
defrasterfont - defines a raster font
SPECIFICATION
C
defrasterfont(n, ht, nc, chars, nr, raster)
short n, ht, nc, nr;
Fontchar chars[nc];
Ushort raster[nr];
FORTRAN
subroutine defras(n, ht, nc, chars, nr, raster)
integer*4 n, ht, nc, nr
integer*2 raster(nr), chars(4*nc)
Pascal
procedure defrasterfont(n, ht, nc, nr: Short; var chars: Fntchrarray;
var raster: Fontraster);
DESCRIPTION
defrasterfont defines a raster font and has six arguments. The first two are n, an index into the font table, and ht, an integer specifying the maximum height, in pixels, of characters in the font. The index n becomes the font’s internal name. nc gives the number of characters in the font and thus the number of elements in the chars array. chars contains a description of each character in the font. The description includes the height and width of the character in pixels, the offsets from the character origin to the lower left corner of this character’s bounding box, an offset into the array of rasters, and the amount to add to the current character position x after drawing the character. raster is an array of nr shorts of bitmap information. It is a one-dimensional array of mask shorts, ordered left to right and then bottom to top. Mask bits are left-justified in the character’s bounding box.
To replace a raster font, define the new one to have the same index as the old one. To delete a raster font, define a font with no characters. The default font, 0, is a fixed pitch font of height 16 and width 9. Font 0 cannot be redefined.
SEE ALSO
charstr, font
NOTE
This command can be used only in immediate mode.
Version 2.3 — July 04, 1985