d2d.font.ttffont
- class TTFFont: d2d.font.ifont.IFont;
- Implementation for SDL_ttf.
- @property TTF_Font* handle();
- Handle to underlying
TTF_Font*
handle.
- void load(string file, int sizeInPt);
- Loads the font from a file.
- @property bool valid();
- Returns if
_handle
is not null
.
- void dispose();
- Deallocates memory and invalidates this.
- IText render(string text, float scale = 1.00000F);
- Renders a string to an IText.
- IText renderMultiline(string text, float scale = 1.00000F);
- Renders a multiline string to an IText.
- @property float lineHeight();
- Returns the line height of this font.
- vec2 measureText(string text, float scale = 1.00000F);
- Returns the dimensions of a string with this font.
- vec2 measureTextMultiline(string text, float scale = 1.00000F);
- Returns the dimensions of a multiline string with this font.
Page generated by Ddoc.