Cache storage for requested fonts.
More...
#include <Font.h>
|
| template<typename StringType > |
| std::optional< std::filesystem::path > | locateFont (const std::filesystem::path &path, StringType fontName) |
| | Locate a font file. More...
|
| |
| template<typename StringType > |
| std::optional< std::filesystem::path > | getFontPath (StringType fontName) |
| | Find a font name in the font name cache. More...
|
| |
| template<typename StringType > |
| FontPointer | getFont (StringType fontName, int ptSize) |
| | Get a FontPointer to a named Font of a specific point size. More...
|
| |
Cache storage for requested fonts.
◆ getFont()
template<typename StringType >
| FontPointer rose::FontCache::getFont |
( |
StringType |
fontName, |
|
|
int |
ptSize |
|
) |
| |
|
inline |
Get a FontPointer to a named Font of a specific point size.
- Template Parameters
-
| StringType | the type of the Font name passed in. |
- Parameters
-
| fontName | The requested font name. |
| ptSize | The requested point size |
- Returns
- a std::optional<FontPointer>
◆ getFontPath()
template<typename StringType >
| std::optional<std::filesystem::path> rose::FontCache::getFontPath |
( |
StringType |
fontName | ) |
|
|
inline |
Find a font name in the font name cache.
- Template Parameters
-
| StringType | the type of fontName |
- Parameters
-
- Returns
- a std::optional<std::filesystem::path> of the font file for the Font.
◆ locateFont()
template<typename StringType >
| std::optional<std::filesystem::path> rose::FontCache::locateFont |
( |
const std::filesystem::path & |
path, |
|
|
StringType |
fontName |
|
) |
| |
|
inline |
Locate a font file.
- Template Parameters
-
| StringType | the type of fontName |
- Parameters
-
| path | The path to start search from |
| fontName | the Font name. |
- Returns
- a std::optional<std::filesystem::path> of the font file.
The documentation for this class was generated from the following file: