Adafruit GFX Library
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.
7 #ifndef _GFXFONT_H_
8 #define _GFXFONT_H_
11 typedef struct {
12  uint16_t bitmapOffset;
13  uint8_t width;
14  uint8_t height;
15  uint8_t xAdvance;
16  int8_t xOffset;
17  int8_t yOffset;
18 } GFXglyph;
21 typedef struct {
22  uint8_t *bitmap;
24  uint16_t first;
25  uint16_t last;
26  uint8_t yAdvance;
27 } GFXfont;
29 #endif // _GFXFONT_H_
uint16_t bitmapOffset
Pointer into GFXfont->bitmap.
Definition: gfxfont.h:12
GFXglyph * glyph
Glyph array.
Definition: gfxfont.h:23
Data stored for FONT AS A WHOLE.
Definition: gfxfont.h:21
uint8_t width
Bitmap dimensions in pixels.
Definition: gfxfont.h:13
uint16_t first
ASCII extents (first char)
Definition: gfxfont.h:24
uint8_t yAdvance
Newline distance (y axis)
Definition: gfxfont.h:26
uint8_t xAdvance
Distance to advance cursor (x axis)
Definition: gfxfont.h:15
uint16_t last
ASCII extents (last char)
Definition: gfxfont.h:25
uint8_t height
Bitmap dimensions in pixels.
Definition: gfxfont.h:14
int8_t yOffset
Y dist from cursor pos to UL corner.
Definition: gfxfont.h:17
uint8_t * bitmap
Glyph bitmaps, concatenated.
Definition: gfxfont.h:22
Font data stored PER GLYPH.
Definition: gfxfont.h:11
int8_t xOffset
X dist from cursor pos to UL corner.
Definition: gfxfont.h:16