#include <StkFontManager.h>
|
void | initSystemFonts () |
| Initialize system fonts. This method will load any TTF fonts installed on the system.
|
|
void | initApplicationFonts () |
| Initialize application fonts. This method will search the [STK::app_data]/data/fonts directory and initialize any TTF fonts found.
|
|
void | initFontsFromDir (const std::string &dir) |
|
bool | loadFontFile (const std::string &font_file, FontEntry &fe) |
|
bool | addFontFile (const std::string &font_id, const std::string &font_file) |
|
void | addFontEntry (const std::string &font_id, const FontEntry &fe) |
|
std::string | getFontFile (const std::string &font_id) const |
|
std::string | getFontDisplayName (const std::string &font_id) const |
|
void | getActiveFontIds (std::vector< std::string > &font_ids) |
|
void | getAllFontIds (std::vector< std::string > &font_ids) |
|
void | clearActiveFonts (bool clear_textures=true) |
|
std::shared_ptr< STK::TextureFont > | getOrCreateFont (const std::string &font_family, FontStyle font_style, int font_size) |
|
std::shared_ptr< STK::TextureFontSDF > | getOrCreateFontSDF (const std::string &font_family, FontStyle font_style, int font_size) |
|
std::shared_ptr< STK::TextureFont > | getOrCreateFont (const std::string &font_id, int font_size) |
|
std::shared_ptr< STK::TextureFontSDF > | getOrCreateFontSDF (const std::string &font_id, int font_size) |
|
void | setOnedgeValue (int onedge_value) |
| Set default "onedge" value. I.e the SDF map value for the edge of a glyph. This method does not affect existing fonts, only changes the default for new fonts that are created afterwards.
|
|
int | getOnedgeValue () const |
|
void | cleanup () |
| Clean up all font rendering objects. This includes deleting the font objects and freeing up any OpenGL textures. This method should be called on shutdown of an application, but before deleting the last OpenGL context.
|
|
|
static constexpr const char * | DefaultFontFamily = "arial" |
|
static const FontStyle | DefaultFontStyle = FontStyle::Regular |
|
FontManager - Short description
◆ setOnedgeValue()
void STK::FontManager::setOnedgeValue |
( |
int |
onedge_value | ) |
|
|
inline |
Set default "onedge" value. I.e the SDF map value for the edge of a glyph. This method does not affect existing fonts, only changes the default for new fonts that are created afterwards.
- Parameters
-
The documentation for this class was generated from the following files:
- Native/SilentToolkit/StkScene/StkFontManager.h
- Native/SilentToolkit/StkScene/StkFontManager.cpp