1 |
schorsch |
2.6 |
/* RCSid $Id: font.h,v 2.5 2003/02/25 02:47:21 greg 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.1 |
|
11 |
greg |
2.5 |
#include "copyright.h" |
12 |
greg |
2.4 |
|
13 |
greg |
2.1 |
typedef unsigned char GORD; |
14 |
|
|
|
15 |
|
|
typedef struct { |
16 |
|
|
short nverts; /* number of vertices */ |
17 |
greg |
2.2 |
GORD left, right, top, bottom; /* glyph extent */ |
18 |
greg |
2.1 |
/* followed by vertex list */ |
19 |
|
|
} GLYPH; |
20 |
|
|
|
21 |
|
|
#define gvlist(g) ((GORD *)((g)+1)) |
22 |
|
|
|
23 |
|
|
typedef struct font { |
24 |
greg |
2.4 |
int nref; /* number of references */ |
25 |
greg |
2.1 |
GLYPH *fg[256]; /* font glyphs */ |
26 |
greg |
2.3 |
short mwidth, mheight; /* mean glyph width and height */ |
27 |
greg |
2.1 |
char *name; /* font file name */ |
28 |
|
|
struct font *next; /* next font in list */ |
29 |
|
|
} FONT; |
30 |
|
|
|
31 |
greg |
2.4 |
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 |
schorsch |
2.6 |
|
41 |
|
|
#ifdef __cplusplus |
42 |
|
|
} |
43 |
greg |
2.4 |
#endif |
44 |
schorsch |
2.6 |
#endif /* _RAD_FONT_H_ */ |
45 |
|
|
|