GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
glutStrokeCharacter(3GLUT) GLUT glutStrokeCharacter(3GLUT)

glutStrokeCharacter - renders a stroke character using OpenGL.

void glutStrokeCharacter(void *font, int character);

font
Stroke font to use.
character
Character to render (not confined to 8 bits).

Without using any display lists, glutStrokeCharacter renders the character in the named stroke font. The available fonts are:
GLUT_STROKE_ROMAN
A proportionally spaced Roman Simplex font for ASCII characters 32 through 127. The maximum top character in the font is 119.05 units; the bottom descends 33.33 units.
GLUT_STROKE_MONO_ROMAN
A mono-spaced spaced Roman Simplex font (same characters as GLUT_STROKE_ROMAN) for ASCII characters 32 through 127. The maximum top character in the font is 119.05 units; the bottom descends 33.33 units. Each character is 104.76 units wide.

Rendering a nonexistent character has no effect. A glTranslatef is used to translate the current model view matrix to advance the width of the character.

Here is a routine that shows how to render a string of ASCII text with glutStrokeCharacter:
  void 
  output(GLfloat x, GLfloat y, char *text)
  {
    char *p;
    glPushMatrix();
    glTranslatef(x, y, 0);
    for (p = text; *p; p++)
      glutStrokeCharacter(GLUT_STROKE_ROMAN, *p);
    glPopMatrix();
  }

If you want to draw stroke font text using wide, antialiased lines, use:

  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  glEnable(GL_BLEND);
  glEnable(GL_LINE_SMOOTH);
  glLineWidth(2.0);
  output(200, 225, "This is antialiased.");

glutBitmapCharacter, glutStrokeWidth

Mark J. Kilgard (mjk@nvidia.com)
3.7 GLUT

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.