Rev 5520 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5520 | leency | 1 | // Truetype library |
5598 | pavelyakov | 2 | #ifndef INCLUDE_LIBTRUETYPE_H |
3 | #define INCLUDE_LIBTRUETYPE_H |
||
5520 | leency | 4 | |
5598 | pavelyakov | 5 | #ifndef INCLUDE_KOLIBRI_H |
6 | #include "../lib/kolibri.h" |
||
7 | #endif |
||
8 | |||
9 | #ifndef INCLUDE_DLL_H |
||
10 | #include "../lib/dll.h" |
||
11 | #endif |
||
5515 | leency | 12 | dword libtruetype = #att_libtruetype; |
13 | char att_libtruetype[22] = "/sys/lib/truetype.obj\0"; |
||
3107 | leency | 14 | |
5515 | leency | 15 | dword truetype = #att_truetype; // truetype(unsigned char *s, stbtt_fontinfo *buffer, char *screen1, int width, int height) |
16 | dword get_length = #att_get_length; // get_length(unsigned char *s, char *buffer, int height, int max_len) |
||
17 | dword get_width = #att_get_width; // get_width_utf8(unsigned char *s, stbtt_fontinfo *buffer, int height) |
||
18 | dword text_out = #att_text_out; // text_out(unsigned char *string, char *buffer, int height, int color,int back_color, int x, int y) |
||
19 | dword init_font = #att_init_font; // init_font(stbtt_fontinfo *font,unsigned char *FontData) |
||
20 | dword text_out_mem = #att_text_out_mem; // text_out_mem(unsigned char *string, stbtt_fontinfo *buffer, int height, int color,int back_color) |
||
3839 | Asper | 21 | $DD 2 dup 0 |
3107 | leency | 22 | |
5515 | leency | 23 | char att_truetype[] = "truetype"; |
24 | char att_get_length[] = "get_length"; |
||
25 | char att_get_width[] = "get_width"; |
||
26 | char att_text_out[] = "text_out"; |
||
5520 | leency | 27 | char att_text_out_mem[] = "text_out_mem"; |
5515 | leency | 28 | char att_init_font[] = "init_font"; |
29 | |||
30 | //============================================================ |
||
31 | //============================================================ |
||
32 | |||
5520 | leency | 33 | char fontinfo[28]; |
34 | |||
5515 | leency | 35 | struct stbtt_fontinfo |
36 | { |
||
37 | dword userdata; |
||
38 | dword data; // pointer to .ttf file |
||
39 | int fontstart; // offset of start of font |
||
40 | |||
41 | int numGlyphs; // number of glyphs, needed for range checking |
||
42 | |||
43 | int loca,head,glyf,hhea,hmtx,kern; // table locations as offset from start of .ttf |
||
44 | int index_map; // a cmap mapping for our chosen character encoding |
||
45 | int indexToLocFormat; // format needed to map from glyph index to glyph |
||
46 | }; |
||
5598 | pavelyakov | 47 | |
48 | #endif |