CHGame 0.3.0
Libraries for the CHGame handheld
Loading...
Searching...
No Matches
CHGfx_gfxfont.h File Reference

The bitmap font container, GFXfont, byte-for-byte Adafruit_GFX's. More...

#include <stdint.h>

Go to the source code of this file.

Classes

struct  GFXglyph
 One glyph's record in a GFXfont: where its bitmap is, its size, and where it sits relative to the pen. More...
 
struct  GFXfont
 A whole bitmap font, for gfx_setFont(): glyph bitmaps, glyph records, the character range and the line spacing. More...
 

Detailed Description

The bitmap font container, GFXfont, byte-for-byte Adafruit_GFX's.

This is deliberately, byte-for-byte, Adafruit_GFX's gfxfont.h layout, down to the include guard. Two consequences, both wanted:

  1. Every font header ever generated by Adafruit's fontconvert - the whole Fonts/ directory of Adafruit_GFX, and the hundreds of converted fonts floating around - drops straight into gfx_setFont() with no translation.
  2. Fonts shipped with CHGfx work unchanged under Adafruit_GFX's own setFont(), including through CHGfx_AdafruitGFX.h.

The shared _GFXFONT_H_ guard means whichever header is included first defines the types and the other one steps aside. That only works because the definitions match, so do not "improve" the field order.

CHGfx.h includes it; a sketch never needs to. The bundled fonts are listed under Fonts.