---
name: "glutStrokeCharacter"
section: "3"
platform: "linux"
package: "freeglut"
version: "3.8.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/glutStrokeCharacter"
---

# glutStrokeCharacter(3)

renders a stroke character using OpenGL.

## NAME

glutStrokeCharacter - renders a stroke character using OpenGL.

## SYNTAX

```

```

void glutStrokeCharacter(void \*font, int character);

## ARGUMENTS

- *font*

  Stroke font to use.

- *character*

  Character to render (not confined to 8 bits).

## DESCRIPTION

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.

## EXAMPLE

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.");

## SEE ALSO

glutBitmapCharacter, glutStrokeWidth

## AUTHOR

Mark J. Kilgard (mjk@nvidia.com)
