GL Studio C++ Runtime API
|
#include <gls_unicode_font_base.h>
Classes | |
struct | CharAttrUnicode_t |
Character attributes. One item for each character in the set. More... | |
struct | FontAttrUnicode_t |
Attributes of the specific font. More... | |
Public Member Functions | |
GlsUnicodeFontBase (GlsUnicodeFontDBUFReader &dbufReader) | |
bool | IsValid (void) const |
ImageVector_t | FontTextures (void) const |
const CharAttrUnicode_t & | CharAttrUnicode (Char_t c) const |
Image * | FontTextureForChar (Char_t c) const |
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 | |
~GlsUnicodeFontBase () | |
Protected Member Functions inherited from GlsFontBase | |
~GlsFontBase () | |
Protected Attributes | |
FontAttrUnicode_t | _fontAttrUnicode |
AttrContUnicode_t | _charAttrUnicode |
ImageVector_t | _fontTextures |
bool | _isValid |
unsigned int | _charAttributeIndexLUTSize |
unsigned short * | _charAttributeIndexLUT |
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 GlsUnicodeFontBase class provides a specific unicode 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 singelton 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.
GlsUnicodeFontBase | ( | GlsUnicodeFontDBUFReader & | dbufReader | ) |
Class Constructor
dbufReader | reader to read BUF data from |
|
protected |
Class Destructor. This is protected so that no one can delete a font except via the font manager GlsFontMan. It is not vitual because we want to avoid calling destructors on unloaded font code, and it is not needed.
const CharAttrUnicode_t& CharAttrUnicode | ( | Char_t | c | ) | const |
get the unicode character attribute for the given char
c | The character to retrieve attributes for. |
Image* FontTextureForChar | ( | Char_t | c | ) | const |
Get the font texture for the font texture containing the given glyph
c | The character to retrieve attributes for. |
ImageVector_t FontTextures | ( | void | ) | const |
get the font textures associated with the unicode font
bool IsValid | ( | void | ) | const |
Determine if font was instantiated correctly
|
protected |
look up table from glyph index ( minus _fontAttributes.firstChar ) to _charAttrUnicode array index else entry has NO_GLYPH to indicate that the given glyph is not in the font ( NOTE : array is _charAttributeIndexLUT long )
|
protected |
number of entries in the _charAttributeIndexLUT = ( lastChar - firstChar ) + 1 )
|
protected |
unicode char attributes
|
protected |
unicode font attributes
|
protected |
font textures
|
protected |
true if font is valid else false
|
static |
char index associated with absent glyph