glutStrokeWidthf, glutStrokeWidth, glutStrokeLengthf, glutStrokeLength — returns the width/length of a stroke character/string.
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
); |
glutStrokeWidthf
| ( |
font
,
character
) →
None
|
glutStrokeLengthf
| ( |
font
,
string
) →
None
|
Deprecated interfaces
glutStrokeWidth
| ( |
font
,
character
) →
None
|
glutStrokeLength
| ( |
font
,
string
) →
None
|
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.
The deprecated glutStrokeWidth and glutStrokeLength routines return an integer rather than a float. Newer GLUT programs should use the newer float-returning routine 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 implementation of glutStrokeLength in GLUT 3.8 and beyond sums the character widths for the strings in a float (though glutStrokeLength still returns an integer).