Name

glutStrokeWidthf, glutStrokeWidth - returns the width of a
stroke character.
glutStrokeLengthf, glutStrokeLength - returns  the  length
of a stroke font string.

Python Specification

glutStrokeLength
	glutStrokeLength(font, string) -> None
glutStrokeWidth
	glutStrokeWidth(font, character) -> None

C Specification

float glutStrokeWidthf(void *font, int character);
float glutStrokeLengthf(void *font, const unsigned char *string);

Deprecated interfaces
int glutStrokeWidth(void *font, int character);
int glutStrokeLength(void *font, const unsigned char *string);

Parameters

font      Stroke  font  to use.  For valid values, see the
          glutStrokeWidth description.

character Character to return width of (not confined to  8
          bits).

string    Text  string (8-bit characters), nul terminated.

Description

glutStrokeWidthf returns the width in modeling units of  a
stroke  character  in  a  supported stroke font. While the
width of characters in a font may vary (though fixed width
fonts  do not vary), the maximum height characteristics of
a particular font are fixed.

glutStrokeLengthf returns the length in modeling units  of
a string (8-bit characters).  This length is equivalent to
summing all the widths returned  by  glutStrokeWidthf  for
each character in the string.

Bugs

The  deprecated  glutStrokeWidth and glutStrokeLength rou-
tines return an integer rather than a float.   Newer  GLUT
programs  should  use  the  newer float-returning iroutine
glutStrokeWidthf and glutStrokeLengthf.  Note  that  these
newer float routines do not exist in implementations prior
to GLUT 3.8.  Also, the  glutStrokeLength  routine  summed
integerized  character  widths  so  it  underestimated the
length of strings prior to GLUT 3.8, but  the  implementa-
tion  of  glutStrokeLength in GLUT 3.8 and beyond sums the
character widths for the strings in a float (though  glut-
StrokeLength still returns an integer).

See Also

glutStrokeCharacter, glutBitmapWidth

Author

Mark J. Kilgard (mjk@nvidia.com)

:: Documentation :: References :: GLUT ::
:: Index (n/a) ::