Basic Adafruit_GFX v1.10.7 library files with ADA_GFX_kbv.h and renamed glcdfont.inc MCUFRIEND_kbv library inherits from Adafruit_GFX
Dependents: TFT_Touch_botao_v1 TFT_Touch_exemplo5_git_touch TESTE_1 TFT_Touch_exemplo6_git_touch_button_3_ ... more
gfxfont.h@0:8ee30e15ac7b, 2021-04-26 (annotated)
- Committer:
- davidprentice
- Date:
- Mon Apr 26 14:39:27 2021 +0000
- Revision:
- 0:8ee30e15ac7b
Basic Adafruit_GFX v1.10.7 Arduino library files; with ADA_GFX_kbv.h and renamed glcdfont.inc
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
davidprentice | 0:8ee30e15ac7b | 1 | // Font structures for newer Adafruit_GFX (1.1 and later). |
davidprentice | 0:8ee30e15ac7b | 2 | // Example fonts are included in 'Fonts' directory. |
davidprentice | 0:8ee30e15ac7b | 3 | // To use a font in your Arduino sketch, #include the corresponding .h |
davidprentice | 0:8ee30e15ac7b | 4 | // file and pass address of GFXfont struct to setFont(). Pass NULL to |
davidprentice | 0:8ee30e15ac7b | 5 | // revert to 'classic' fixed-space bitmap font. |
davidprentice | 0:8ee30e15ac7b | 6 | |
davidprentice | 0:8ee30e15ac7b | 7 | #ifndef _GFXFONT_H_ |
davidprentice | 0:8ee30e15ac7b | 8 | #define _GFXFONT_H_ |
davidprentice | 0:8ee30e15ac7b | 9 | |
davidprentice | 0:8ee30e15ac7b | 10 | /// Font data stored PER GLYPH |
davidprentice | 0:8ee30e15ac7b | 11 | typedef struct { |
davidprentice | 0:8ee30e15ac7b | 12 | uint16_t bitmapOffset; ///< Pointer into GFXfont->bitmap |
davidprentice | 0:8ee30e15ac7b | 13 | uint8_t width; ///< Bitmap dimensions in pixels |
davidprentice | 0:8ee30e15ac7b | 14 | uint8_t height; ///< Bitmap dimensions in pixels |
davidprentice | 0:8ee30e15ac7b | 15 | uint8_t xAdvance; ///< Distance to advance cursor (x axis) |
davidprentice | 0:8ee30e15ac7b | 16 | int8_t xOffset; ///< X dist from cursor pos to UL corner |
davidprentice | 0:8ee30e15ac7b | 17 | int8_t yOffset; ///< Y dist from cursor pos to UL corner |
davidprentice | 0:8ee30e15ac7b | 18 | } GFXglyph; |
davidprentice | 0:8ee30e15ac7b | 19 | |
davidprentice | 0:8ee30e15ac7b | 20 | /// Data stored for FONT AS A WHOLE |
davidprentice | 0:8ee30e15ac7b | 21 | typedef struct { |
davidprentice | 0:8ee30e15ac7b | 22 | uint8_t *bitmap; ///< Glyph bitmaps, concatenated |
davidprentice | 0:8ee30e15ac7b | 23 | GFXglyph *glyph; ///< Glyph array |
davidprentice | 0:8ee30e15ac7b | 24 | uint16_t first; ///< ASCII extents (first char) |
davidprentice | 0:8ee30e15ac7b | 25 | uint16_t last; ///< ASCII extents (last char) |
davidprentice | 0:8ee30e15ac7b | 26 | uint8_t yAdvance; ///< Newline distance (y axis) |
davidprentice | 0:8ee30e15ac7b | 27 | } GFXfont; |
davidprentice | 0:8ee30e15ac7b | 28 | |
davidprentice | 0:8ee30e15ac7b | 29 | #endif // _GFXFONT_H_ |