Declares stuff used in fonts.cpp
Definition in file fonts.h.
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
class | glictFont |
Represents one font usable by GLICT. (GLICT currently uses only one, "system"). More... | |
Typedefs | |
typedef bool(* | _glictFontRenderFuncBoolNoSize )(const char *text, const void *font, float x, float y) |
typedef bool(* | _glictFontRenderFuncBoolNoSize )(const char *text, const void *font, float x, float y) |
typedef bool(* | _glictFontRenderFuncBoolSize )(const char *text, const void *font, float size, float x, float y) |
typedef bool(* | _glictFontRenderFuncBoolSize )(const char *text, const void *font, float size, float x, float y) |
typedef void(* | _glictFontRenderFuncVoidNoSize )(const char *text, const void *font, float x, float y) |
typedef void(* | _glictFontRenderFuncVoidNoSize )(const char *text, const void *font, float x, float y) |
typedef void(* | _glictFontRenderFuncVoidSize )(const char *text, const void *font, float size, float x, float y) |
typedef void(* | _glictFontRenderFuncVoidSize )(const char *text, const void *font, float size, float x, float y) |
typedef float(* | _glictFontSizeFuncNoSize )(const char *text, const void *font) |
typedef float(* | _glictFontSizeFuncSize )(const char *text, const void *font, float size) |
typedef std::vector < glictFont * > | _GLICTFONTVECTOR |
typedef _GLICTFONTVECTOR::iterator | _GLICTFONTVECTORITERATOR |
Functions | |
glictFont * | glictCreateFont (const char *name) |
Creates the font for further use. | |
bool | glictDeleteFont (const char *name) |
glictFont * | glictFindFont (const char *name) |
int | glictFontNumberOfLines (const char *text) |
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) |
glictFont* glictCreateFont | ( | const char * | name | ) |
Creates the font for further use.
name | Specifies the font name that'll be used when referencing to this font |
Definition at line 61 of file fonts.cpp.
References glictFindFont(), glictFonts, and glictFont::SetName().
bool glictFontRender | ( | const char * | text, | |
const char * | fontname, | |||
float | fontsize, | |||
float | x, | |||
float | y | |||
) |
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.
Definition at line 153 of file fonts.cpp.
References glictFont::fontparam, glictFont::GetName(), glictFindFont(), glictFont::RenderBoolNoSize, glictFont::RenderBoolSize, glictFont::RenderVoidNoSize, and glictFont::RenderVoidSize.
bool glictFontRender | ( | const char * | text, | |
const char * | fontname, | |||
float | x, | |||
float | y | |||
) |
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.
Definition at line 119 of file fonts.cpp.
References glictFontRender().