--- ray/src/common/font.h 1992/06/24 17:52:59 2.3 +++ ray/src/common/font.h 2022/02/02 00:01:48 2.10 @@ -1,11 +1,14 @@ -/* Copyright (c) 1992 Regents of the University of California */ - -/* SCCSid "$SunId$ LBL" */ - +/* RCSid $Id: font.h,v 2.10 2022/02/02 00:01:48 greg Exp $ */ /* * Header file for font handling routines */ +#ifndef _RAD_FONT_H_ +#define _RAD_FONT_H_ +#ifdef __cplusplus +extern "C" { +#endif + typedef unsigned char GORD; typedef struct { @@ -17,10 +20,24 @@ typedef struct { #define gvlist(g) ((GORD *)((g)+1)) typedef struct font { - GLYPH *fg[256]; /* font glyphs */ - short mwidth, mheight; /* mean glyph width and height */ - char *name; /* font file name */ + char name[64]; /* font file name */ struct font *next; /* next font in list */ + unsigned short nref; /* number of references */ + short mwidth, mheight; /* mean glyph width and height */ + short maxgv; /* max # glyph vertices */ + GLYPH *fg[256]; /* font glyphs */ } FONT; -extern FONT *getfont(); +extern int retainfonts; /* retain loaded fonts? */ + +extern FONT *getfont(char *fname); +extern void freefont(FONT *f); +extern int uniftext(short *sp, char *tp, FONT *f); +extern int squeeztext(short *sp, char *tp, FONT *f, int cis); +extern int proptext(short *sp, char *tp, FONT *f, int cis, int nsi); + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_FONT_H_ */ +