// Adopted by Bodmer to support TFT_HX8357_Due library.

// Font structures for newer Adafruit_GFX (1.1 and later).
// Example fonts are included in 'Fonts' directory.
// To use a font in your Arduino sketch, #include the corresponding .h
// file and pass address of GFXfont struct to setFont().  Pass NULL to
// revert to 'classic' fixed-space bitmap font.

#ifndef _GFXFONT_H_
#define _GFXFONT_H_

#ifdef LOAD_GFXFF

typedef struct {              // Data stored PER GLYPH
    uint32_t bitmapOffset;    // Pointer into GFXfont->bitmap
    uint8_t width, height;    // Bitmap dimensions in pixels
    uint8_t xAdvance;         // Distance to advance cursor (x axis)
    int8_t xOffset, yOffset;  // Dist from cursor pos to UL corner
} GFXglyph;

#ifdef USE_M5_FONT_CREATOR
typedef struct {
    uint16_t start;
    uint16_t end;
    uint16_t base;
} EncodeRange;
#endif

typedef struct {           // Data stored for FONT AS A WHOLE:
    uint8_t *bitmap;       // Glyph bitmaps, concatenated
    GFXglyph *glyph;       // Glyph array
    uint16_t first, last;  // ASCII extents
    uint8_t yAdvance;      // Newline distance (y axis)
#ifdef USE_M5_FONT_CREATOR
    uint16_t range_num;
    EncodeRange *range;
    uint8_t smooth_bpp;
#endif
} GFXfont;

#endif  // LOAD_GFXFF

#endif  // _GFXFONT_H_