TTFFontEncoder.h 391 B

1234567891011121314151617181920212223
  1. #include <ft2build.h>
  2. #include FT_FREETYPE_H
  3. #define START_INDEX 32
  4. #define END_INDEX 127
  5. #define GLYPH_PADDING 4
  6. namespace gameplay
  7. {
  8. // Structure of Glyph.
  9. class Glyph
  10. {
  11. public:
  12. unsigned int index;
  13. unsigned int width;
  14. float uvCoords[4];
  15. };
  16. int writeFont(const char* filename, unsigned int fontSize, const char* id, bool fontpreview);
  17. }