Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glxusexfont(3) [xfree86 man page]

GLXUSEXFONT()															     GLXUSEXFONT()

NAME
glXUseXFont - create bitmap display lists from an X font C SPECIFICATION
void glXUseXFont( Font font, int first, int count, int listBase ) delim $$ PARAMETERS
font Specifies the font from which character glyphs are to be taken. first Specifies the index of the first glyph to be taken. count Specifies the number of glyphs to be taken. listBase Specifies the index of the first display list to be generated. DESCRIPTION
glXUseXFont generates count display lists, named listBase through listBase+count-1, each containing a single glBitmap command. The parame- ters of the glBitmap command of display list listBase+i are derived from glyph first+i. Bitmap parameters xorig, yorig, width, and height are computed from font metrics as descent-1, -lbearing, rbearing-lbearing, and ascent+descent, respectively. xmove is taken from the glyph's width metric, and ymove is set to zero. Finally, the glyph's image is converted to the appropriate format for glBitmap. Using glXUseXFont may be more efficient than accessing the X font and generating the display lists explicitly, both because the display lists are created on the server without requiring a round trip of the glyph data, and because the server may choose to delay the creation of each bitmap until it is accessed. Empty display lists are created for all glyphs that are requested and are not defined in font. glXUseXFont is ignored if there is no cur- rent GLX context. ERRORS
BadFont is generated if font is not a valid font. GLXBadContextState is generated if the current GLX context is in display-list construction mode. GLXBadCurrentWindow is generated if the drawable associated with the current context of the calling thread is a window, and that window is no longer valid. SEE ALSO
glBitmap, glXMakeCurrent GLXUSEXFONT()

Check Out this Related Man Page

glutBitmapCharacter(3GLUT)					       GLUT						glutBitmapCharacter(3GLUT)

NAME
glutBitmapCharacter - renders a bitmap character using OpenGL. SYNTAX
void glutBitmapCharacter(void *font, int character); ARGUMENTS
font Bitmap font to use. character Character to render (not confined to 8 bits). DESCRIPTION
Without using any display lists, glutBitmapCharacter renders the character in the named bitmap font. The available fonts are: GLUT_BITMAP_8_BY_13 A fixed width font with every character fitting in an 8 by 13 pixel rectangle. The exact bitmaps to be used is defined by the stan- dard X glyph bitmaps for the X font named: -misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1 GLUT_BITMAP_9_BY_15 A fixed width font with every character fitting in an 9 by 15 pixel rectangle. The exact bitmaps to be used is defined by the stan- dard X glyph bitmaps for the X font named: -misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1 GLUT_BITMAP_TIMES_ROMAN_10 A 10-point proportional spaced Times Roman font. The exact bitmaps to be used is defined by the standard X glyph bitmaps for the X font named: -adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1 GLUT_BITMAP_TIMES_ROMAN_24 A 24-point proportional spaced Times Roman font. The exact bitmaps to be used is defined by the standard X glyph bitmaps for the X font named: -adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1 GLUT_BITMAP_HELVETICA_10 A 10-point proportional spaced Helvetica font. The exact bitmaps to be used is defined by the standard X glyph bitmaps for the X font named: -adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1 GLUT_BITMAP_HELVETICA_12 A 12-point proportional spaced Helvetica font. The exact bitmaps to be used is defined by the standard X glyph bitmaps for the X font named: -adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1 GLUT_BITMAP_HELVETICA_18 A 18-point proportional spaced Helvetica font. The exact bitmaps to be used is defined by the standard X glyph bitmaps for the X font named: -adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1 Rendering a nonexistent character has no effect. glutBitmapCharacter automatically sets the OpenGL unpack pixel storage modes it needs appropriately and saves and restores the previous modes before returning. The generated call to glBitmap will adjust the current raster position based on the width of the character. EXAMPLE
Here is a routine that shows how to render a string of ASCII text with glutBitmapCharacter: void output(int x, int y, char *string) { int len, i; glRasterPos2f(x, y); len = (int) strlen(string); for (i = 0; i < len; i++) { glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, string[i]); } } SEE ALSO
glutBitmapWidth, glutStrokeCharacter AUTHOR
Mark J. Kilgard (mjk@nvidia.com) GLUT
3.7 glutBitmapCharacter(3GLUT)
Man Page