Subversion Repositories Kolibri OS

Rev

Rev 5499 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

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