You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.0 KiB

  1. #ifndef GAL_OPENGL_RESOURCES_H___
  2. #define GAL_OPENGL_RESOURCES_H___
  3. #define BITMAP_FONT_USE_SPANS
  4. namespace KIGFX {
  5. namespace BUILTIN_FONT {
  6. struct FONT_IMAGE_TYPE {
  7. unsigned int width, height;
  8. unsigned int char_border;
  9. unsigned int spacing;
  10. unsigned char pixels[1024 * 1024 * 3];
  11. };
  12. struct FONT_INFO_TYPE {
  13. unsigned int smooth_pixels;
  14. float min_y;
  15. float max_y;
  16. };
  17. struct FONT_SPAN_TYPE {
  18. unsigned int start;
  19. unsigned int end;
  20. unsigned int cumulative;
  21. };
  22. struct FONT_GLYPH_TYPE {
  23. unsigned int atlas_x, atlas_y;
  24. unsigned int atlas_w, atlas_h;
  25. float minx, maxx;
  26. float miny, maxy;
  27. float advance;
  28. };
  29. extern FONT_IMAGE_TYPE font_image;
  30. extern FONT_INFO_TYPE font_information;
  31. const FONT_GLYPH_TYPE* LookupGlyph( unsigned int aCodePoint );
  32. }
  33. }
  34. #endif