SysTutorials

Linux Manual Pages › Section 3

glutstrokelength(3)

glutStrokeLength – Returns model space width of a string in a given font.

Library

OpenGLUT – fonts

Synopsis

In openglut.h Ft float Fn glutStrokeLength void *fontID const unsigned char *string

Parameters

Bf Em
 fontID Ef
    A GLUT stroked font identifier.

Bf Em
 string Ef
    A C-style (NUL-terminated) string.

Description

This function reports the sum of the widths of the characters in a Bf Sy
 string, Ef
 using the font metrics of a given Bf Sy
 font. Ef
 

Like glutStrokeString(), glutStrokeLength() respects newlines in the input.

Returns 0 if:
 – The  Bf Sy
 fontID Ef
 is out of range.
 – The  Bf Sy
 string Ef
 is  Bf Sy
 NULL. Ef
 
 – All characters in the  Bf Sy
 string Ef
 are zero-width.

Caveats

Refer to glutStrokeWidth() for notes on the nature of this function’s return value, and for comparisons to old GLUT and freeglut.

See Also

glutStrokeString(3) glutStrokeWidth(3) glutStrokeHeight(3) glutBitmapLength(3)