30 bool init(
const char* fontname =
nullptr)
override;
42 int getStringWidth(
float fontSize,
const char*
string,
int len)
const override;
47 void drawString(
float dx,
float dy,
float fontSize,
const float* color,
const char*
string,
int length,
bool shadow=
true,
const float* shadowColor=
nullptr,
bool flipped=
false)
override;
50 ML_OPENGL_NAMESPACE::GL2DFont *_font;
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
Abstract GL font drawing using FTGL.
bool init(const char *fontname=nullptr) override
init with given font (either just a font name without .ttf or an absolute path) requires a valid GL c...
int getFontHeight(float fontSize) const override
get height of font (ascender + descender)
~View2DFontFTGL() override
int getStringWidth(float fontSize, const char *string, int len) const override
get width of simple string
void drawString(float dx, float dy, float fontSize, const float *color, const char *string, int length, bool shadow=true, const float *shadowColor=nullptr, bool flipped=false) override
draws a simple string with no linefeeds, the drawing starts at the top-left corner color needs to poi...
int getFontAscender(float fontSize) const override
get ascender of font
int getFontDescender(float fontSize) const override
get descender of font
Abstract GL font drawing using FTGL.