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
|
|
|
|
2005-12-08 22:12:57 +00:00
|
|
|
#include "bitmap.h"
|
|
|
|
#include "app.h"
|
2003-01-09 20:47:14 +00:00
|
|
|
|
|
|
|
#define fntAlignLeft 0
|
|
|
|
#define fntAlignCenter 1
|
|
|
|
#define fntAlignRight 2
|
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 );
|
2003-01-09 20:47:14 +00:00
|
|
|
extern txSample * fntRender( wItem * item,int px,char * fmt,... );
|
2001-08-25 21:04:29 +00:00
|
|
|
|
2001-10-04 20:33:29 +00:00
|
|
|
#endif
|
|
|
|
|