|
FifeGUI 0.3.0
A C++ GUI library designed for games.
|
#include <fontloader.hpp>
Static Public Member Functions | |
| static std::filesystem::path | findFontFile (std::string const &fontName, std::vector< std::filesystem::path > const &searchPaths={}) |
| static std::vector< std::filesystem::path > | getDefaultSearchPaths () |
| static std::shared_ptr< Font > | loadFont (Graphics &graphics, std::string const &fontName, int size, std::vector< std::filesystem::path > const &searchPaths={}) |
Helper class for searching and loading fonts.
This provides the same functionality as the previous free functions but grouped inside an exported class to improve encapsulation and allow stateful extensions in the future.
Definition at line 27 of file fontloader.hpp.
|
static |
Find a font file by name searching the provided paths.
| fontName | Font family or filename to search for. |
| searchPaths | Optional list of paths to search. If empty the default search paths are used. |
Definition at line 113 of file fontloader.cpp.
References getDefaultSearchPaths().
Referenced by loadFont().
|
static |
Returns default search paths used when locating font files on the current platform.
Definition at line 78 of file fontloader.cpp.
Referenced by findFontFile().
|
static |
Load a Font object for the given font name and size using the provided Graphics implementation.
| graphics | Graphics instance used for creating font resources. |
| fontName | Font family or filename. |
| size | Requested font size in points. |
| searchPaths | Optional search paths for locating font files. |
Definition at line 146 of file fontloader.cpp.
References fcn::Graphics::createFont(), and findFontFile().