2 /* Copyright (c) Mark J. Kilgard, 1995. */
4 /* This program is freely distributable without licensing fees
5 and is provided without guarantee or warrantee expressed or
6 implied. This program is -not- in the public domain. */
9 #include "glutstroke.h"
13 glutStrokeWidth(GLUTstrokeFont font
, int c
)
15 StrokeFontPtr fontinfo
;
16 const StrokeCharRec
*ch
;
18 #if defined(_WIN32) || defined(GLUT_IMPORT_LIB)
19 fontinfo
= (StrokeFontPtr
) __glutFont(font
);
21 fontinfo
= (StrokeFontPtr
) font
;
24 if (c
< 0 || c
>= fontinfo
->num_chars
)
26 ch
= &(fontinfo
->ch
[c
]);
34 glutStrokeLength(GLUTstrokeFont font
, const unsigned char *string
)
37 StrokeFontPtr fontinfo
;
38 const StrokeCharRec
*ch
;
40 #if defined(_WIN32) || defined(GLUT_IMPORT_LIB)
41 fontinfo
= (StrokeFontPtr
) __glutFont(font
);
43 fontinfo
= (StrokeFontPtr
) font
;
47 for (; *string
!= '\0'; string
++) {
49 if (c
>= 0 && c
< fontinfo
->num_chars
) {
50 ch
= &(fontinfo
->ch
[c
]);