Hasty Badger
Small UI library (a branch of Turbo Badger)
|
TBFontDescription describes a font. More...
#include <tb_font_desc.h>
Public Member Functions | |
void | SetID (const TBID &id) |
Set the font ID of the font to use. More... | |
TBID | GetID () const |
Get the TBID for the font name (See SetID). More... | |
TBID | GetFontFaceID () const |
Get the TBID for the TBFontFace that matches this font description. More... | |
void | SetSize (uint32_t size) |
uint32_t | GetSize () const |
void | SetOutline (bool outline) |
bool | GetOutline () const |
TBFontDescription (const TBFontDescription &src) | |
const TBFontDescription & | operator= (const TBFontDescription &src) |
bool | operator== (const TBFontDescription &fd) const |
bool | operator!= (const TBFontDescription &fd) const |
TBFontDescription describes a font.
By default when nothing is set, the font is unspecified and means it should be inherited from a parent widget that specifies a font, or use the default font if no parent does.
|
inline |
Get the TBID for the TBFontFace that matches this font description.
This is a ID combining both the font file, and variation (such as size and style), and should be used to identify a certain font face.
If this is 0, the font description is unspecified. For a widget, that means that the font should be inherited from the parent widget.
|
inline |
Set the font ID of the font to use.
This ID maps to the font names in TBFontInfo, which is managed from TBFontManager::AddFontInfo, TBFontManager::GetFontInfo.
Example: If a font was added to the font manager with the name "Vera", you can do font_description.SetID(TBIDC("Vera")).