*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/defrasterfont (3)              
Title
Content
Arch
Section
 

Contents


defrasterfont(3G)					     defrasterfont(3G)


NAME    [Toc]    [Back]

     defrasterfont - defines a raster font

C SPECIFICATION    [Toc]    [Back]

     void defrasterfont(short n, short ht, short nc,
			Fontchar chars[], short	nr, unsigned short raster[])

PARAMETERS    [Toc]    [Back]

     n	      expects the constant that	you want to use	as the identifier for
	      this raster font.	 This constant is used as an index into	a font
	      table. The default font, 0, is a fixed-pitch font	with a height
	      of 15 and	width of 9.  Font 0 cannot be redefined.

     ht	      expects the maximum height (in pixels) for a character.

     nc	      expects the number of characters in this font.

     chars    expects an array of character description	structures of type
	      Fontchar.	 The Fontchar structure	is defined in <gl/gl.h>	as:

		   typedef struct {
		       unsigned	short offset;
		       Byte w, h;
		       signed char xoff, yoff;
		       short width;
		   } Fontchar;

	      offset expects the element number	of raster at which the bitmap
	      for this character starts.  The element numbers start at zero.

	      w	expects	the number of columns in the bitmap that contain set
	      bits (character width).

	      h	expects	the number of rows in the bitmap of the	character
	      (including ascender and descender).

	      xoff expects bitmap columns between the start of the character's
	      bitmap and the start of the character.

	      yoff expects the number rows between the character's baseline
	      and the bottom of	the bitmap.  For characters with descenders
	      (e.g., g)	this value is a	negative number.  For characters that
	      rest entirely on the baseline, this value	is zero.

	      width expects the	pixel width for	the character. This value
	      tells the	system how far to space	after drawing the character.
	      (This value is added to the character position.)

     nr	      expects the number of 16-bit integers in raster.






									Page 1






defrasterfont(3G)					     defrasterfont(3G)



     raster   expects a	one-dimensional	array that contains all	the bit	maps
	      (masks) for the characters in the	font.  Each element of the
	      array is a 16-bit	integer	and the	elements are ordered left to
	      right, bottom to top.  When interpreting each element, the bits
	      are left justified within	the character's	bounding box.

	      The maximum row width for	a single bitmap	is not limited to the
	      capacity of a single 16-bit integer array	element.  The rows of
	      a	bitmap may span	more than one array element.  However, each
	      new row in the character bitmap must start with its own array
	      element.	Likewise, each new character bitmap must start with
	      its own array element. The system	reads the row width and
	      starting location	for a character	bitmap from the	structures in
	      the chars	array.

DESCRIPTION    [Toc]    [Back]

     defrasterfont defines a raster font.  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. Patterns,	cursors, and
     fonts are available to all	windows	when using multiple windows.

SEE ALSO    [Toc]    [Back]

      
      
     charstr, cmov, font, getcpos, getdescender, getfont, getheight, strwidth

NOTE    [Toc]    [Back]

     This routine is available only in immediate mode.


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
deflfont IRIX defines a raster font capable of accommodating large rasters
getfont IRIX returns the current raster font number
font IRIX selects a raster font for drawing text strings
udcc HP-UX user-defined character raster font compiler
udc HP-UX user-defined character raster font format
getheight IRIX returns the maximum character height in the current raster font
XmFontListEntryLoad HP-UX A font list function that loads a font or creates a font set and creates an accompanying font list entry
XmFontListEntryLoad IRIX A font list function that loads a font or creates a font set and creates an accompanying font list entry
XmFontListEntryLoad Tru64 A font list function that loads a font or creates a font set and creates an accompanying font list e...
XmFontListEntryGetFont HP-UX A font list function that retrieves font information from a font list entry
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service