47 bool _isInitialized =
false;
51 void _begin12Bit(uint16_t color12Bit);
55 GrFont(
void) =
delete;
70 void begin(uint16_t color16Bit);
78 void begin(uint8_t red, uint8_t green, uint8_t blue);
94 inline int8_t
kerning(uint8_t first, uint8_t second)
const
96 uint16_t ID = (
static_cast<uint16_t
>(first) << 8) | second;
108 uint8_t
placeText(
Canvas &canvas,
char cc, uint16_t x, uint16_t y)
const;
119 uint8_t
placeText(
Canvas &canvas,
const char *
const text, uint16_t buffSize, uint16_t x, uint16_t y)
const;
134 uint16_t
textWidth(
const char *
const text, uint16_t buffSize)
const;
142 virtual int8_t
kerning(uint16_t ID)
const = 0;
ROM_Image base
Definition ROM_Images.h:24
uint16_t textWidth(const char cc) const
Determines the with of character, cc, in screen pixels.
Definition GrFont.cpp:117
int8_t kerning(uint8_t first, uint8_t second) const
Finds the amount of kerning that should be used between two characters.
Definition GrFont.h:94
GrFont(ROM_Image imgLoc, uint16_t lineHeight, uint16_t base)
Constructs a new GrFont object.
Definition GrFont.h:63
virtual int8_t kerning(uint16_t ID) const =0
Finds the amount of kerning that should be used between two characters.
uint8_t placeText(Canvas &canvas, char cc, uint16_t x, uint16_t y) const
Places a character onto the canvas.
Definition GrFont.cpp:67
virtual bool charDef(char cc, CharDef_t &results) const =0
Abstract function, used to define the characteristics of each character.
const uint16_t LINE_HEIGHT
Recommended vertical spacing between lines of text.
Definition GrFont.h:40
const ROM_Image imgLoc
Location of the font in Flash ROM.
Definition GrFont.h:38
const uint16_t BASE
Definition GrFont.h:41
void begin(uint16_t color16Bit)
Initializes the font and sets the font's foreground color.
Definition GrFont.cpp:10
Data Structure that defines an individual character.
Definition GrFont.h:18
int16_t yoffset
Cursor y-offset that should be used when copying character to the screen.
Definition GrFont.h:24
uint16_t y
UL y-position of the character within the DRAM image.
Definition GrFont.h:20
uint16_t height
Height of the character in the DRAM image.
Definition GrFont.h:22
uint16_t width
Width of the character in the DRAM image.
Definition GrFont.h:21
int16_t xoffset
Cursor x-offset that should be used when copying character to the screen.
Definition GrFont.h:23
uint16_t xadvance
How far to advance the curso x-pos after this character.
Definition GrFont.h:25
uint16_t x
UL x-position of the character within the DRAM image.
Definition GrFont.h:19
Structure to define the size and location of an image in Flash.
Definition Common.h:44