David Prentice / ADA_GFX_kbv_R1107

Dependents:   TFT_Touch_botao_v1 TFT_Touch_exemplo5_git_touch TESTE_1 TFT_Touch_exemplo6_git_touch_button_3_ ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers gfxfont.h Source File

gfxfont.h

00001 // Font structures for newer Adafruit_GFX (1.1 and later).
00002 // Example fonts are included in 'Fonts' directory.
00003 // To use a font in your Arduino sketch, #include the corresponding .h
00004 // file and pass address of GFXfont struct to setFont().  Pass NULL to
00005 // revert to 'classic' fixed-space bitmap font.
00006 
00007 #ifndef _GFXFONT_H_
00008 #define _GFXFONT_H_
00009 
00010 /// Font data stored PER GLYPH
00011 typedef struct {
00012   uint16_t bitmapOffset; ///< Pointer into GFXfont->bitmap
00013   uint8_t width;         ///< Bitmap dimensions in pixels
00014   uint8_t height;        ///< Bitmap dimensions in pixels
00015   uint8_t xAdvance;      ///< Distance to advance cursor (x axis)
00016   int8_t xOffset;        ///< X dist from cursor pos to UL corner
00017   int8_t yOffset;        ///< Y dist from cursor pos to UL corner
00018 } GFXglyph;
00019 
00020 /// Data stored for FONT AS A WHOLE
00021 typedef struct {
00022   uint8_t *bitmap;  ///< Glyph bitmaps, concatenated
00023   GFXglyph *glyph;  ///< Glyph array
00024   uint16_t first;   ///< ASCII extents (first char)
00025   uint16_t last;    ///< ASCII extents (last char)
00026   uint8_t yAdvance; ///< Newline distance (y axis)
00027 } GFXfont;
00028 
00029 #endif // _GFXFONT_H_