TGUI  0.7.8
tgui::Font Class Reference

Public Member Functions

 Font ()
 Default constructor which will set the font to nullptr.
 
 Font (std::nullptr_t)
 Constructor which will explicitly set the font to nullptr.
 
 Font (const std::string &id)
 Constructor to create the font from a string (filename by default) More...
 
 Font (const char *id)
 Constructor to create the font from a string (filename by default) More...
 
 Font (std::shared_ptr< sf::Font > font)
 Constructor to share the font directly. More...
 
 Font (const sf::Font &font)
 Constructor to set a copy of your font. More...
 
std::shared_ptr< sf::Font > getFont () const
 Get the underlying SFML font. More...
 

Constructor & Destructor Documentation

◆ Font() [1/4]

tgui::Font::Font ( const std::string &  id)

Constructor to create the font from a string (filename by default)

Parameters
idString to pass to the Deserializer class to load the font

◆ Font() [2/4]

tgui::Font::Font ( const char *  id)

Constructor to create the font from a string (filename by default)

Parameters
idString to pass to the Deserializer class to load the font

◆ Font() [3/4]

tgui::Font::Font ( std::shared_ptr< sf::Font >  font)

Constructor to share the font directly.

Parameters
fontFont to share

◆ Font() [4/4]

tgui::Font::Font ( const sf::Font &  font)

Constructor to set a copy of your font.

Parameters
fontFont to copy

Member Function Documentation

◆ getFont()

std::shared_ptr< sf::Font > tgui::Font::getFont ( ) const

Get the underlying SFML font.

Returns
Font stored in this object

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