2001-08-25 21:04:29 +00:00
|
|
|
|
2002-05-28 11:55:17 +00:00
|
|
|
#ifndef _FONT_H
|
|
|
|
#define _FONT_H
|
2001-08-25 21:04:29 +00:00
|
|
|
|
2002-11-02 20:10:18 +00:00
|
|
|
#include "../bitmap.h"
|
2001-08-25 21:04:29 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int x,y; // location
|
|
|
|
int sx,sy; // size
|
|
|
|
} fntChar;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
fntChar Fnt[256];
|
|
|
|
txSample Bitmap;
|
|
|
|
char name[128];
|
|
|
|
} bmpFont;
|
|
|
|
|
|
|
|
extern txSample Bitmap;
|
2002-05-28 11:55:17 +00:00
|
|
|
extern bmpFont * Fonts[26];
|
2001-08-25 21:04:29 +00:00
|
|
|
|
|
|
|
extern int fntAddNewFont( char * name );
|
2001-09-01 19:57:44 +00:00
|
|
|
extern void fntFreeFont( void );
|
2001-08-25 21:04:29 +00:00
|
|
|
extern int fntFindID( char * name );
|
2002-07-19 20:51:48 +00:00
|
|
|
extern int fntTextHeight( int id,char * str );
|
|
|
|
extern int fntTextWidth( int id,char * str );
|
2001-08-25 21:04:29 +00:00
|
|
|
|
2002-05-28 11:55:17 +00:00
|
|
|
extern int fntRead( char * path,char * fname );
|
2001-08-25 21:04:29 +00:00
|
|
|
extern txSample * fntRender( int id,int px,int sx,char * fmt,... );
|
|
|
|
|
2001-10-04 20:33:29 +00:00
|
|
|
#endif
|
|
|
|
|