Linduino  1.3.0
Linear Technology Arduino-Compatible Demonstration Board
gfxfont.h
Go to the documentation of this file.
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 typedef struct // Data stored PER GLYPH
11 {
12  uint16_t bitmapOffset; // Pointer into GFXfont->bitmap
13  uint8_t width, height; // Bitmap dimensions in pixels
14  uint8_t xAdvance; // Distance to advance cursor (x axis)
15  int8_t xOffset, yOffset; // Dist from cursor pos to UL corner
16 } GFXglyph;
17 
18 typedef struct // Data stored for FONT AS A WHOLE:
19 {
20  uint8_t *bitmap; // Glyph bitmaps, concatenated
21  GFXglyph *glyph; // Glyph array
22  uint8_t first, last; // ASCII extents
23  uint8_t yAdvance; // Newline distance (y axis)
24 } GFXfont;
25 
26 #endif // _GFXFONT_H_
uint8_t width
Definition: gfxfont.h:13
uint8_t yAdvance
Definition: gfxfont.h:23
uint8_t xAdvance
Definition: gfxfont.h:14
uint16_t bitmapOffset
Definition: gfxfont.h:12
GFXglyph * glyph
Definition: gfxfont.h:21
uint8_t last
Definition: gfxfont.h:22
uint8_t * bitmap
Definition: gfxfont.h:20
int8_t yOffset
Definition: gfxfont.h:15