Simulant  21.12-230
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
Public Member Functions | Static 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
TexturePtr texture () const
MaterialPtr material () 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< int16_t, int16_t > character_offset (char32_t ch)
uint16_t size () const
int16_t ascent () const
int16_t descent () const
int16_t line_gap () 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)

Static Public Member Functions

static std::string generate_name (const std::string &family, const uint16_t &size, FontWeight weight, FontStyle style)
- Static Public Member Functions inherited from smlt::RefCounted< Font >
static RefCounted< Font >::ptr create (Args &&... args)
static RefCounted< Font >::ptr create ()


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
- 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: