#include <fontmanager.hpp>
Definition at line 13 of file fontmanager.hpp.
◆ FontManager()
| FontManager::FontManager |
( |
| ) |
|
|
default |
◆ ~FontManager()
| FontManager::~FontManager |
( |
| ) |
|
|
default |
◆ GetFont() [1/2]
| std::pair< uint32_t, std::shared_ptr< TextRenderer > > FontManager::GetFont |
( |
const std::string & | path, |
|
|
int | glyph_size, |
|
|
bool | fixed ) |
Returns a font from the parameters given. If the font is already loaded, it will return the font and increase the number of copies, otherwise it will load the font and return it.
- Returns
- A pair with the font id and the font itself.
Definition at line 4 of file fontmanager.cpp.
◆ GetFont() [2/2]
| std::shared_ptr< TextRenderer > FontManager::GetFont |
( |
uint32_t | id | ) |
|
Returns a font from the id given.
- Returns
- the font
Definition at line 21 of file fontmanager.cpp.
◆ GetFonts()
| std::unordered_map< uint32_t, struct FontInfo > & FontManager::GetFonts |
( |
| ) |
|
|
inline |
◆ ReleaseFont()
| void FontManager::ReleaseFont |
( |
uint32_t | font_id | ) |
|
Decreases the number of copies of the font with the id given. If the number of copies reaches 0, the font will be deleted.
Definition at line 30 of file fontmanager.cpp.
◆ UpdateFont()
| std::pair< uint32_t, std::shared_ptr< TextRenderer > > FontManager::UpdateFont |
( |
uint32_t | font_id, |
|
|
const std::string & | path, |
|
|
int | glyph_size, |
|
|
bool | fixed ) |
Updates the font with the id given with the new parameters.
Definition at line 40 of file fontmanager.cpp.
The documentation for this class was generated from the following files: