Simulant  21.06-50
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Friends | List of all members
smlt::Font Class Reference
Inheritance diagram for smlt::Font:
smlt::RefCounted< Font > smlt::Asset smlt::Loadable smlt::generic::Identifiable< FontID > smlt::ChainNameable< Font > smlt::TwoPhaseConstructed smlt::Nameable smlt::Nameable

Public Member Functions

 Font (FontID id, AssetManager *asset_manager)
 
bool init () override
 
bool is_valid () const
 
TextureID texture_id () const
 
MaterialID material_id () const
 
std::pair< Vec2, Vec2texture_coordinates_for_character (char32_t c)
 
float character_width (char32_t ch)
 
float character_height (char32_t ch)
 
float character_advance (char32_t ch, char32_t next)
 
std::pair< float, float > character_offset (char32_t ch)
 
uint32_t size () const
 
float ascent () const
 
float descent () const
 
- Public Member Functions inherited from smlt::TwoPhaseConstructed
virtual void clean_up ()
 
- Public Member Functions inherited from smlt::Asset
 Asset (AssetManager *manager)
 
AssetManagerasset_manager ()
 
const AssetManagerasset_manager () const
 
int age () const
 
void set_garbage_collection_method (GarbageCollectMethod method)
 
- Public Member Functions inherited from smlt::Nameable
void set_name (const std::string &name)
 
const std::string & name () const
 
bool has_name () const
 
- Public Member Functions inherited from smlt::generic::Identifiable< FontID >
 Identifiable (FontID id)
 
FontID id () const
 
virtual bool operator== (const Identifiable< FontID > &rhs) const
 
virtual bool operator< (const Identifiable< FontID > &rhs) const
 
void _bind_id_pointer (ResourceTypePtr ptr)
 
void _overwrite_id (FontID new_id)
 
- Public Member Functions inherited from smlt::ChainNameable< Font >
Fontset_name_and_get (const std::string &name)
 

Friends

class ui::Widget
 
class loaders::TTFLoader
 
class loaders::FNTLoader
 

Additional Inherited Members

- Public Types inherited from smlt::RefCounted< Font >
typedef std::shared_ptr< Fontptr
 
typedef std::weak_ptr< Fontwptr
 
- Public Types inherited from smlt::generic::Identifiable< FontID >
typedef FontID id_type
 
- Static Public Member Functions inherited from smlt::RefCounted< Font >
static RefCounted< Font >::ptr create (Args &&... args)
 
static RefCounted< Font >::ptr create ()
 
- Public Attributes inherited from smlt::Asset
Property< generic::DataCarrier Asset::* > data = {this, &Asset::data_}
 
- Protected Member Functions inherited from smlt::RefCounted< Font >
 RefCounted (Args &&...)
 
- Protected Member Functions inherited from smlt::Asset
 Asset (const Asset &rhs)
 
Assetoperator= (const Asset &rhs)
 

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