Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::TBFontDescription Class Reference

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 TBFontDescriptionoperator= (const TBFontDescription &src)
 
bool operator== (const TBFontDescription &fd) const
 
bool operator!= (const TBFontDescription &fd) const
 

Detailed Description

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.

Member Function Documentation

TBID tb::TBFontDescription::GetFontFaceID ( ) const
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.

TBID tb::TBFontDescription::GetID ( ) const
inline

Get the TBID for the font name (See SetID).

void tb::TBFontDescription::SetID ( const TBID id)
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")).


The documentation for this class was generated from the following file: