1 |
< |
/* Copyright (c) 1992 Regents of the University of California */ |
2 |
< |
|
3 |
< |
/* SCCSid "$SunId$ LBL" */ |
4 |
< |
|
1 |
> |
/* RCSid $Id$ */ |
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 start, width; /* glyph size for prop. spacing */ |
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 FONT *getfont(); |
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 |
> |
|