1693
|
1
|
6218
|
2 #ifndef _FONT_H
|
|
3 #define _FONT_H
|
1693
|
4
|
|
5 #include "../bitmap/bitmap.h"
|
|
6
|
|
7 typedef struct
|
|
8 {
|
|
9 int x,y; // location
|
|
10 int sx,sy; // size
|
|
11 } fntChar;
|
|
12
|
|
13 typedef struct
|
|
14 {
|
|
15 fntChar Fnt[256];
|
|
16 txSample Bitmap;
|
|
17 char name[128];
|
|
18 } bmpFont;
|
|
19
|
|
20 extern txSample Bitmap;
|
6218
|
21 extern bmpFont * Fonts[26];
|
1693
|
22
|
|
23 extern int fntAddNewFont( char * name );
|
1829
|
24 extern void fntFreeFont( void );
|
1693
|
25 extern int fntFindID( char * name );
|
6755
|
26 extern int fntTextHeight( int id,char * str );
|
|
27 extern int fntTextWidth( int id,char * str );
|
1693
|
28
|
6218
|
29 extern int fntRead( char * path,char * fname );
|
1693
|
30 extern txSample * fntRender( int id,int px,int sx,char * fmt,... );
|
|
31
|
2082
|
32 #endif
|
|
33
|