#include <fonts.h>
Definition at line 49 of file fonts.h.
Public Member Functions | |
void * | GetFontParam () |
std::string | GetName () |
glictFont () | |
void | SetFontParam (void *font) |
void | SetName (const char *newname) |
void | SetRenderFunc (_glictFontRenderFuncVoidNoSize funcpointer) |
Sets the render function that will be used to draw font. (Version with size, without success return). | |
void | SetRenderFunc (_glictFontRenderFuncBoolNoSize funcpointer) |
Sets the render function that will be used to draw font. (Version with size, with success return). | |
void | SetSizeFunc (_glictFontSizeFuncSize funcpointer) |
Sets the size function that will be used to get text width. (Version with size). | |
~glictFont () | |
Private Attributes | |
void * | fontparam |
std::string | name |
_glictFontRenderFuncBoolNoSize | RenderBoolNoSize |
_glictFontRenderFuncBoolSize | RenderBoolSize |
_glictFontRenderFuncVoidNoSize | RenderVoidNoSize |
_glictFontRenderFuncVoidSize | RenderVoidSize |
_glictFontSizeFuncNoSize | SizeNoSize |
_glictFontSizeFuncSize | SizeSize |
Friends | |
bool | glictFontRender (const char *text, const char *fontname, float fontsize, float x, float y) |
Renders the font using specified size. | |
bool | glictFontRender (const char *text, const char *fontname, float x, float y) |
Renders the font using default size. | |
float | glictFontSize (const char *name, const char *font, float size) |
float | glictFontSize (const char *name, const char *font) |
void glictFont::SetRenderFunc | ( | _glictFontRenderFuncVoidNoSize | funcpointer | ) |
Sets the render function that will be used to draw font. (Version with size, without success return).
Sets the render function that will be used to draw font. (Version without size, without success return).
Definition at line 260 of file fonts.cpp.
References RenderBoolNoSize, RenderBoolSize, RenderVoidNoSize, RenderVoidSize, and SetRenderFunc().
void glictFont::SetRenderFunc | ( | _glictFontRenderFuncBoolNoSize | funcpointer | ) |
Sets the render function that will be used to draw font. (Version with size, with success return).
Sets the render function that will be used to draw font. (Version without size, with success return).
Definition at line 244 of file fonts.cpp.
References RenderBoolNoSize, RenderBoolSize, RenderVoidNoSize, RenderVoidSize, and SetRenderFunc().
Referenced by SetRenderFunc().
void glictFont::SetSizeFunc | ( | _glictFontSizeFuncSize | funcpointer | ) |
Sets the size function that will be used to get text width. (Version with size).
Sets the size function that will be used to get text width. (Version without size).
Definition at line 276 of file fonts.cpp.
References SizeNoSize, and SizeSize.
bool glictFontRender | ( | const char * | text, | |
const char * | fontname, | |||
float | fontsize, | |||
float | x, | |||
float | y | |||
) | [friend] |
Renders the font using specified size.
text | Specifies the text being drawn | |
fontname | Specifies name of font used for rendering | |
fontsize | Specifies size of font used for rendering | |
x | X coordinate of destination | |
y | Y coordinate of destination |
If needed to call many times, you should consider finding the class of the font you're trying to render using glictFindFont() and remember its pointer, then call it directly, especially if you load tons of fonts.
Default size is set to 10. Font resizer believes the font is rendered at size 1.
There is an overloaded variant of this function that renders using default font size.
bool glictFontRender | ( | const char * | text, | |
const char * | fontname, | |||
float | x, | |||
float | y | |||
) | [friend] |
Renders the font using default size.
text | Specifies the text being drawn | |
fontname | Specifies name of font used for rendering | |
x | X coordinate of destination | |
y | Y coordinate of destination |
If needed to call many times, you should consider finding the class of the font you're trying to render using glictFindFont() and remember its pointer, then call it directly, especially if you load tons of fonts.
Default size is set to 10. Font resizer believes the font is rendered at size 1.
There is an overloaded variant of this function that allows specifying font size as third parameter.