Namespace containing functions for interacting with font packages.
More...
Namespace containing functions for interacting with font packages.
For more information, see BlamFontPackage.
◆ Cleanup()
void Blam::Content::Fonts::Cleanup |
( |
| ) |
|
Releases all font package data from memory.
◆ FontExists()
bool Blam::Content::Fonts::FontExists |
( |
std::string |
id | ) |
|
Checks if a font package exists with a given name.
- Parameters
-
id | - The unique ID/name of the font package. |
- Returns
true
if the font exists, otherwise returns false
.
◆ GetFont()
Retrieves a font package from its name.
- Parameters
-
id | - The unique ID/name of the desired font package. |
- Returns
- Pointer to the font package. If the font could not be found, then
nullptr
is returned.
◆ GetFontList()
BlamMap< std::string, BlamFontPackage * > Blam::Content::Fonts::GetFontList |
( |
| ) |
|
Retrieves the map of all available fonts.
Each key contains the name of the font, and each value contains the pointer to the associated font package.
- Returns
- A BlamMap containing all available font packages.
◆ LoadAllFonts()
void Blam::Content::Fonts::LoadAllFonts |
( |
| ) |
|
Loads all available font packages within the fonts directory.
◆ LoadFont()
BlamResult Blam::Content::Fonts::LoadFont |
( |
std::string |
font_name | ) |
|
◆ LoadFontDirectory()
BlamResult Blam::Content::Fonts::LoadFontDirectory |
( |
std::string |
directory | ) |
|
Attempts to load an unpackaged (XML) font from a directory.
- Parameters
-
directory | - The path to the font directory. |
- Returns
BlamResult::Success_OK
if the font was loaded successfully, otherwise returns an error code.
◆ LoadFontPackage()
BlamResult Blam::Content::Fonts::LoadFontPackage |
( |
std::string |
file | ) |
|
Attempts to load a font package from a file.
- Parameters
-
file | - The path to the font package file. |
- Returns
BlamResult::Success_OK
if the font was loaded successfully, otherwise returns an error code.
- Todo:
- Implement.