FabGL
ESP32 Display Controller and Graphics Library

◆ drawText() [2/2]

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

Draws a string at specified position.

drawText() uses the specified font and currently selected glyph options (setGlyphOptions() method).

Parameters
fontInfoPointer to font structure containing font info and glyphs data.
XHorizontal position of first character left side.
YVertical position of first character top side.
textString to draw (indexes in the character font glyphs set).
wrapIf true text is wrapped at the end of line.

Example:

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

Definition at line 401 of file canvas.cpp.