MCPcopy Create free account
hub / github.com/TankOs/SFGUI / LoadFont

Method LoadFont

src/SFGUI/FileResourceLoader.cpp:9–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace sfg {
8
9std::shared_ptr<const sf::Font> FileResourceLoader::LoadFont( const std::string& path ) const {
10 auto font = std::make_shared<sf::Font>();
11
12 if( !font->openFromFile( path ) ) {
13 return std::shared_ptr<const sf::Font>();
14 }
15
16 return font;
17}
18
19std::shared_ptr<const sf::Image> FileResourceLoader::LoadImage( const std::string& path ) const {
20 auto image = std::make_shared<sf::Image>();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected