sourparse.h 500 B

12345678910111213141516171819202122
  1. #ifndef SOURPARSE_H
  2. #define SOURPARSE_H
  3. #include "stdint.h"
  4. typedef struct {
  5. int *x_coords, *y_coords, *contour_end_indicies, number_of_points, number_of_contours;
  6. uint8_t *flags;
  7. } SP_glyph;
  8. typedef struct {
  9. int current_byte, number_of_glyphs, *glyph_offsets;
  10. uint16_t *unicode_to_glyph_indicies, units_per_em;
  11. uint8_t *buffer;
  12. SP_glyph *glyphs;
  13. int16_t index_to_loca_format;
  14. } SP_font;
  15. SP_font SP_load_font(char *filename);
  16. void SP_free_font(SP_font* font);
  17. #endif