font_info.h 936 B

123456789101112131415161718192021222324
  1. #pragma once
  2. /* GENERATED BY https://github.com/pavius/the-dot-factory */
  3. #include <stdint.h>
  4. // This structure describes a single character's display information
  5. typedef struct {
  6. const uint8_t width; // width, in bits (or pixels), of the character
  7. const uint16_t
  8. offset; // offset of the character's bitmap, in bytes, into the the FONT_INFO's data array
  9. } FONT_CHAR_INFO;
  10. // Describes a single font
  11. typedef struct {
  12. const uint8_t height; // height, in pages (8 pixels), of the font's characters
  13. const uint8_t startChar; // the first character in the font (e.g. in charInfo and data)
  14. const uint8_t endChar; // the last character in the font
  15. const uint8_t spacePixels; // number of pixels that a space character takes up
  16. const FONT_CHAR_INFO* charInfo; // pointer to array of char information
  17. const uint8_t* data; // pointer to generated array of character visual representation
  18. } FONT_INFO;