2001-08-25 23:04:29 +02:00
|
|
|
|
2002-05-28 13:55:17 +02:00
|
|
|
#ifndef _FONT_H
|
|
|
|
#define _FONT_H
|
2001-08-25 23:04:29 +02:00
|
|
|
|
2002-11-02 21:10:18 +01:00
|
|
|
#include "../bitmap.h"
|
2001-08-25 23:04:29 +02: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 13:55:17 +02:00
|
|
|
extern bmpFont * Fonts[26];
|
2001-08-25 23:04:29 +02:00
|
|
|
|
|
|
|
extern int fntAddNewFont( char * name );
|
2001-09-01 21:57:44 +02:00
|
|
|
extern void fntFreeFont( void );
|
2001-08-25 23:04:29 +02:00
|
|
|
extern int fntFindID( char * name );
|
2002-07-19 22:51:48 +02:00
|
|
|
extern int fntTextHeight( int id,char * str );
|
|
|
|
extern int fntTextWidth( int id,char * str );
|
2001-08-25 23:04:29 +02:00
|
|
|
|
2002-05-28 13:55:17 +02:00
|
|
|
extern int fntRead( char * path,char * fname );
|
2001-08-25 23:04:29 +02:00
|
|
|
extern txSample * fntRender( int id,int px,int sx,char * fmt,... );
|
|
|
|
|
2001-10-04 22:33:29 +02:00
|
|
|
#endif
|
|
|
|
|