ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/font.h
Revision: 2.5
Committed: Tue Feb 25 02:47:21 2003 UTC (21 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad3R5
Changes since 2.4: +2 -57 lines
Log Message:
Replaced inline copyright notice with #include "copyright.h"

File Contents

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