1 #ifndef _GX_STUDIO_FONT_UTIL_H_
2 #define _GX_STUDIO_FONT_UTIL_H_
3 
4 
5 #define GXS_FONT_UTIL_SUCCESS                0
6 #define GXS_FONT_UTIL_INVALID_FILENAME_PTR   1
7 #define GXS_FONT_UTIL_FT_INIT_FREETYPE_ERROR 2
8 #define GXS_FONT_UTIL_CANNOT_OPEN_FONT_FILE  3
9 #define GXS_FONT_UTIL_SET_CHAR_SIZE_ERROR    4
10 #define GXS_FONT_UTIL_MALLOC_FAILURE         5
11 #define GXS_FONT_UTIL_LIBRARY_UNINITIAZLIED  6
12 
13 #define GXS_FONT_UTIL
14 
15 typedef struct
16 {
17     short          gx_glyph_ascent;
18     short          gx_glyph_descent;
19     unsigned char  gx_glyph_advance;
20     char           gx_glyph_leading;
21     int            width;
22     int            height;
23     int            pitch;
24     unsigned char *gx_glyph_data; /* pointer to Glyph bitmap data.
25                                      The size of the bitmap is width * height */
26 } GXS_FONT_DATA;
27 
28 typedef struct
29 {
30     int           initialized;
31     FT_Library    library;
32     FT_Face       face;
33     int           size;
34 
35 } GXS_FONT_LIBRARY_HANDLE;
36 
37 
38 int gxs_font_util_open(char *font_file, int pt, int aa, GXS_FONT_LIBRARY_HANDLE *handle);
39 int gxs_font_util_get_glyph(GXS_FONT_LIBRARY_HANDLE handle, int glyph_index, int pt, int aa, GXS_FONT_DATA *font_data);
40 int gxs_font_util_close(GXS_FONT_LIBRARY_HANDLE handle);
41 void DeleteFont(GX_FONT *DelMe);
42 
43 #endif
44 
45 
46