1UNTITLED                             LOCAL                            UNTITLED
2

NAME

4     glutStrokeWidth — Returns the width in pixels of a character in a given
5     font.
6

LIBRARY

8     OpenGLUT - fonts
9

SYNOPSIS

11     #include <openglut.h>
12
13     float
14     glutStrokeWidth(void *fontID, int character);
15

PARAMETERS

17      fontID     A GLUT stroked font identifier.
18
19      character  A character code.
20

DESCRIPTION

22     This function reports how far the model space origin will advance if you
23     putput this  character  in the font named by  fontID.   Not all letters
24     will use their full width, especially in fixed-width fonts.
25
26     Returns 0 if  character  is out of range or if the  fontID  is invalid.
27

CAVEATS

29     Historically, this function has been described as returning a pixel-
30     width, but was implemented to return the width in model-space units,
31     rounded to integers. GLUT never resolved this, and freeglut duplicated
32     the confusion. OpenGLUT has decided to stay in model-space and to return
33     the unrounded floating point value. An unreleased GLUT 3.8 was supposed
34     to include glutStrokeWidthf() and glutStrokeLengthf() (note the *f suf‐
35     fixes), but that is not in wide use.
36

TODO

38     Determine if any glyphs are either wider than this function or if they
39     render outside of the bounding box given by  (0,-descent)   by
40     (width,height-descent)  .
41

SEE ALSO

43     glutStrokeCharacter(3) glutStrokeLength(3)
44     glutStrokeHeight(glutBitmapWidth) 3
45
46
47
48
49                                     Epoch
Impressum