DGen/SDL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
font.h
Go to the documentation of this file.
1 #ifndef __FONT_H__
2 #define __FONT_H__
3 
4 #include <stddef.h>
5 #include <stdint.h>
6 
7 enum font_type {
12 };
13 
14 struct dgen_font {
15  unsigned int w;
16  unsigned int h;
17  const short *(*data)[0x80];
18 };
19 
20 extern const struct dgen_font dgen_font[];
21 
22 extern const struct dgen_font *font_select(unsigned int max_width,
23  unsigned int max_height,
24  enum font_type type);
25 extern size_t font_text_width(const char *msg, size_t len,
26  unsigned int max_width, unsigned int max_height,
27  enum font_type type);
28 extern size_t font_text_max_len(unsigned int max_width,
29  unsigned int max_height,
30  enum font_type type);
31 extern size_t font_text(uint8_t *buf,
32  unsigned int max_width, unsigned int max_height,
33  unsigned int bytes_per_pixel, unsigned int pitch,
34  const char *msg, size_t len, unsigned int mark,
35  enum font_type type);
36 
37 #endif /* __FONT_H__ */