GL Studio API
|
#include <gls_runtime_font_base.h>
Public Types | |
typedef GlsFontBase::FontAttr_t | FontAttrRuntime_t |
Attributes of the specific font. | |
typedef GlsFontBase::CharAttr_t | CharAttrRuntime_t |
Character attributes. One item for each character in the set. | |
Public Member Functions | |
GlsRuntimeFontBase (const char *family, const char *style, const unsigned int ptSize, const char *fontPath, const unsigned int maxCharWidth, const unsigned int maxCharHeight, const unsigned int descender) | |
bool | IsValid (void) const |
const CharAttrRuntime_t & | CharAttrRuntime (Char_t c) const |
RuntimeGlyphGenerationFont * | GetRuntimeGlyphGenerationFont () |
Public Member Functions inherited from GlsFontBase | |
GlsFontBase (const FontAttr_t &fontAttr, const AttrCont_t &charAttributes, Image *texture) | |
const FontAttr_t & | Attributes () const |
const CharAttr_t & | CharAttr (Char_t c) const |
GLuint | CharAttrIndex (Char_t c) const |
const AttrCont_t & | CharAttributes () const |
std::string | Family () const |
std::string | Key () const |
GLfloat | MaxCharHeight () const |
GLfloat | MaxCharWidth () const |
GLuint | PtSize () const |
std::string | Style () const |
Image * | Texture () const |
Static Public Attributes | |
static const unsigned short | NO_GLYPH |
Protected Member Functions | |
~GlsRuntimeFontBase () | |
Protected Member Functions inherited from GlsFontBase | |
~GlsFontBase () | |
Protected Attributes | |
FontAttrRuntime_t | _fontAttrRuntime |
CharAttrRuntime_t | _charAttrRuntime |
bool | _isValid |
std::auto_ptr< RuntimeGlyphGenerationFont > | _runtimeGlyphGenerationFont |
Protected Attributes inherited from GlsFontBase | |
FontAttr_t | _attr |
AttrCont_t | _charAttr |
std::string | _key |
Image * | _texture |
Additional Inherited Members | |
Static Public Member Functions inherited from GlsFontBase | |
static std::string | Key (const std::string &name, const std::string &style, GLuint ptSize) |
The GlsRuntimeFontBase class provides a specific font face for use within the GL Studio. The font face is determined at construction time by the parameters passed in by the creator of the GlsFontBase instance. Specific instances should be wrapped in a singleton object wrapper, as there is no reason to have more than one instance of the exact same face (meaning font family, style, and point size.)
Once instanced, a GlsFontRenderer object can be used to render characters in Open GL at specific locations and with several different text effects.
GlsRuntimeFontBase | ( | const char * | family, |
const char * | style, | ||
const unsigned int | ptSize, | ||
const char * | fontPath, | ||
const unsigned int | maxCharWidth, | ||
const unsigned int | maxCharHeight, | ||
const unsigned int | descender | ||
) |
Class Constructor
family | the family name of the font. |
style | the style name of the font. |
ptSize | the point size of the font. |
fontPath | the path and filename of the font file to load. |
maxCharWidth | the maximum width of the largest character. |
maxCharHeight | the maximum height of the largest character. |
descender | the maximum descender of the largest character. |
|
protected |
Class Destructor. This is protected so that no one can delete a font except via the font manager GlsFontMan. It is not virtual because we want to avoid calling destructors on unloaded font code, and it is not needed.
const CharAttrRuntime_t& CharAttrRuntime | ( | Char_t | c | ) | const |
Gets the runtime character attribute for the given char
c | The character to retrieve attributes for. |
RuntimeGlyphGenerationFont* GetRuntimeGlyphGenerationFont | ( | ) |
Gets a pointer to the internal data needed for runtime glyph generation.
bool IsValid | ( | void | ) | const |
Determine if font was instantiated correctly
|
mutableprotected |
runtime char attributes
|
protected |
runtime font attributes
|
protected |
true if font is valid else false
|
protected |
Pointer to the internal data needed for runtime glyph generation.
|
static |
char index associated with absent glyph