PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
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.

gfxfont.h 924B

3 jaren geleden
123456789101112131415161718192021222324
  1. // Font structures for newer Adafruit_GFX (1.1 and later).
  2. // Example fonts are included in 'Fonts' directory.
  3. // To use a font in your Arduino sketch, #include the corresponding .h
  4. // file and pass address of GFXfont struct to setFont(). Pass NULL to
  5. // revert to 'classic' fixed-space bitmap font.
  6. #ifndef _GFXFONT_H_
  7. #define _GFXFONT_H_
  8. typedef struct { // Data stored PER GLYPH
  9. uint16_t bitmapOffset; // Pointer into GFXfont->bitmap
  10. uint8_t width, height; // Bitmap dimensions in pixels
  11. uint8_t xAdvance; // Distance to advance cursor (x axis)
  12. int8_t xOffset, yOffset; // Dist from cursor pos to UL corner
  13. } GFXglyph;
  14. typedef struct { // Data stored for FONT AS A WHOLE:
  15. uint8_t *bitmap; // Glyph bitmaps, concatenated
  16. GFXglyph *glyph; // Glyph array
  17. uint8_t first, last; // ASCII extents
  18. uint8_t yAdvance; // Newline distance (y axis)
  19. } GFXfont;
  20. #endif // _GFXFONT_H_