defrasterfont(3G) defrasterfont(3G)
NAME
defrasterfont - defines a raster font
SPECIFICATION
C defrasterfont(n, ht, nc, chars, nr, raster)
short n, ht, nc, nr;
Fontchar chars[];
short raster[];
FORTRAN subroutine defras(n, ht, nc, chars, nr, raster)
integer*4 n, ht, nc, nr
integer*2 raster(nr), chars(4*nc)
DESCRIPTION
defrasterfont defines a raster font. n is an index into the
font table; ht is an integer that specifies the maximum
height of characters in the font in pixels. n becomes the
font's internal name. nc gives the number of characters in
the font and the number of elements in 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 the 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 bottom to top. Mask bits are left-justified in
the character's bounding box.
To replace a raster font, specify the index of the previous
font as the index for the new font. 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.
Page 1 (printed 8/20/87)
defrasterfont(3G) defrasterfont(3G)
SEE ALSO
charstr, font, getfont, getheight, getdescender, strwidth
Programming Guide, Section 5.3, Fonts
NOTE
This routine is available only in immediate mode.
Page 2 (printed 8/20/87)