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