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