Aurore
A Switch-like interface for your app, on every screen
Loading...
Searching...
No Matches
aurore::FontLoader Class Referenceabstract

#include <aurore/core/font.hpp>

Public Member Functions

virtual ~FontLoader ()
 
virtual void loadFonts ()=0
 

Static Public Attributes

static std::string USER_FONT_PATH = AURORE_ASSET("font/font.ttf")
 
static std::string USER_ICON_PATH = AURORE_ASSET("font/icon.ttf")
 
static std::string USER_EMOJI_PATH
 

Protected Member Functions

bool loadFontFromFile (std::string fontName, std::string filePath)
 
bool loadMaterialFromResources ()
 

Constructor & Destructor Documentation

◆ ~FontLoader()

virtual aurore::FontLoader::~FontLoader ( )
inlinevirtual

Member Function Documentation

◆ loadFontFromFile()

bool aurore::FontLoader::loadFontFromFile ( std::string  fontName,
std::string  filePath 
)
protected

Convenience method to load a font from a file path with some more logging.

◆ loadFonts()

virtual void aurore::FontLoader::loadFonts ( )
pure virtual

Called once on init to load every font in the font stash.

The implementation must use the Application::loadFont and Application::loadFontFromMemory methods to load as much as possible of the "built-in" fonts defined in the FONT_* constants above.

◆ loadMaterialFromResources()

bool aurore::FontLoader::loadMaterialFromResources ( )
protected

Can be called internally to load the Material icons font from resources. Returns true if the operation succeeds.

Member Data Documentation

◆ USER_EMOJI_PATH

std::string aurore::FontLoader::USER_EMOJI_PATH
inlinestatic

◆ USER_FONT_PATH

std::string aurore::FontLoader::USER_FONT_PATH = AURORE_ASSET("font/font.ttf")
inlinestatic

◆ USER_ICON_PATH

std::string aurore::FontLoader::USER_ICON_PATH = AURORE_ASSET("font/icon.ttf")
inlinestatic

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