Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
STK::FontManager Class Reference

#include <StkFontManager.h>

Classes

struct  FontEntry
 

Public Member Functions

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::TextureFontgetOrCreateFont (const std::string &font_family, FontStyle font_style, int font_size)
 
std::shared_ptr< STK::TextureFontSDFgetOrCreateFontSDF (const std::string &font_family, FontStyle font_style, int font_size)
 
std::shared_ptr< STK::TextureFontgetOrCreateFont (const std::string &font_id, int font_size)
 
std::shared_ptr< STK::TextureFontSDFgetOrCreateFontSDF (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 Public Attributes

static constexpr const char * DefaultFontFamily = "arial"
 
static const FontStyle DefaultFontStyle = FontStyle::Regular
 

Detailed Description

FontManager - Short description

Member Function Documentation

◆ 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
onedge_value

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