FabGL2 2.0.0
ESP32 Display Controller and Graphics Library for ESP-IDF
Loading...
Searching...
No Matches

◆ drawText() [1/2]

void drawText ( FontInfo const * fontInfo,
int X,
int Y,
char const * text,
bool wrap = false )

Draws a string at the specified position, using the specified font.

drawText() uses the specified font and the glyph options set with setGlyphOptions().

Parameters
fontInfoPointer to the font structure containing font information and glyph data.
XHorizontal position of the left side of the first character.
YVertical position of the top side of the first character.
textString to draw (indexes into the font glyph set).
wrapIf true, text wraps at the end of the line.

Example:

// Draw a 'Hello World!' at position 100, 100
Canvas.drawText(&fabgl::FONT_8x8, 100, 100, "Hello World!");

Definition at line 409 of file canvas.cpp.