ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/font.h
Revision: 2.7
Committed: Fri Jun 27 06:53:21 2003 UTC (20 years, 10 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1, rad5R3
Changes since 2.6: +1 -3 lines
Log Message:
Broke standard.h into rtio.h, rterror.h, rtmath.h, and rtmisc.h

File Contents

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