ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/font.h
Revision: 2.6
Committed: Fri Jun 6 16:38:47 2003 UTC (20 years, 10 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 2.5: +11 -10 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 /* RCSid $Id: font.h,v 2.5 2003/02/25 02:47:21 greg Exp $ */
2 /*
3 * Header file for font handling routines
4 */
5 #ifndef _RAD_FONT_H_
6 #define _RAD_FONT_H_
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 #include "copyright.h"
12
13 typedef unsigned char GORD;
14
15 typedef struct {
16 short nverts; /* number of vertices */
17 GORD left, right, top, bottom; /* glyph extent */
18 /* followed by vertex list */
19 } GLYPH;
20
21 #define gvlist(g) ((GORD *)((g)+1))
22
23 typedef struct font {
24 int nref; /* number of references */
25 GLYPH *fg[256]; /* font glyphs */
26 short mwidth, mheight; /* mean glyph width and height */
27 char *name; /* font file name */
28 struct font *next; /* next font in list */
29 } FONT;
30
31 extern int retainfonts; /* retain loaded fonts? */
32
33
34 extern FONT *getfont(char *fname);
35 extern void freefont(FONT *f);
36 extern int uniftext(short *sp, char *tp, FONT *f);
37 extern int squeeztext(short *sp, char *tp, FONT *f, int cis);
38 extern int proptext(short *sp, char *tp, FONT *f, int cis, int nsi);
39
40
41 #ifdef __cplusplus
42 }
43 #endif
44 #endif /* _RAD_FONT_H_ */
45