glutstrokelength(3) - Linux man page

Name

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

Library

OpenGLUT - fonts

Synopsis

#include <openglut.h>

float

glutStrokeLength(void *fontID, const unsigned char *string);

Parameters

fontID A GLUT stroked font identifier.

string A C-style (NUL-terminated) string.

Description

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

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

Returns 0 if: - The fontID is out of range. - The string is NULL. - All characters in the string 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)

BSD Epoch BSD