acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
gfxfont.h (1076B)
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 7 #ifndef _GFXFONT_H_ 8 #define _GFXFONT_H_ 9 10 /// Font data stored PER GLYPH 11 typedef struct 12 { 13 uint16_t bitmapOffset; ///< Pointer into GFXfont->bitmap 14 uint8_t width; ///< Bitmap dimensions in pixels 15 uint8_t height; ///< Bitmap dimensions in pixels 16 uint8_t xAdvance; ///< Distance to advance cursor (x axis) 17 int8_t xOffset; ///< X dist from cursor pos to UL corner 18 int8_t yOffset; ///< Y dist from cursor pos to UL corner 19 } GFXglyph; 20 21 /// Data stored for FONT AS A WHOLE 22 typedef struct 23 { 24 uint8_t *bitmap; ///< Glyph bitmaps, concatenated 25 GFXglyph *glyph; ///< Glyph array 26 uint8_t first; ///< ASCII extents (first char) 27 uint8_t last; ///< ASCII extents (last char) 28 uint8_t yAdvance; ///< Newline distance (y axis) 29 } GFXfont; 30 31 #endif // _GFXFONT_H_