Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 #include <stdint.h> 00011 00012 typedef struct { // Data stored PER GLYPH 00013 uint16_t bitmapOffset; // Pointer into GFXfont->bitmap 00014 uint8_t width, height; // Bitmap dimensions in pixels 00015 uint8_t xAdvance; // Distance to advance cursor (x axis) 00016 int8_t xOffset, yOffset; // Dist from cursor pos to UL corner 00017 } GFXglyph; 00018 00019 typedef struct { // Data stored for FONT AS A WHOLE: 00020 uint8_t *bitmap; // Glyph bitmaps, concatenated 00021 GFXglyph *glyph; // Glyph array 00022 uint8_t first, last; // ASCII extents 00023 uint8_t yAdvance; // Newline distance (y axis) 00024 } GFXfont; 00025 00026 #endif // _GFXFONT_H_
Generated on Wed Jul 13 2022 16:35:49 by
1.7.2