2 /* Copyright (c) Mark J. Kilgard, 1994. */
4 /* This program is freely distributable without licensing fees
5 and is provided without guarantee or warrantee expressed or
6 implied. This program is -not- in the public domain. */
9 #include "glutstroke.h"
12 glutStrokeCharacter(GLUTstrokeFont font, int c)
14 const StrokeCharRec *ch;
15 const StrokeRec *stroke;
16 const CoordRec *coord;
17 StrokeFontPtr fontinfo;
22 fontinfo = (StrokeFontPtr) __glutFont(font);
24 fontinfo = (StrokeFontPtr) font;
27 if (c < 0 || c >= fontinfo->num_chars)
29 ch = &(fontinfo->ch[c]);
31 for (i = ch->num_strokes, stroke = ch->stroke;
32 i > 0; i--, stroke++) {
33 glBegin(GL_LINE_STRIP);
34 for (j = stroke->num_coords, coord = stroke->coord;
35 j > 0; j--, coord++) {
36 glVertex2f(coord->x, coord->y);
40 glTranslatef(ch->right, 0.0, 0.0);