Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
FontUtils.h File Reference
#include <set>
#include <stdint.h>
#include <string>
#include <vector>

Namespaces

namespace  UTILS
 
namespace  UTILS::FONT
 
namespace  UTILS::FONT::FONTPATH
 

Functions

std::string UTILS::FONT::FONTPATH::GetSystemFontPath (const std::string &filename)
 Provided a font filename returns the complete path for the font in the system font folder (if it exists) or an empty string otherwise.
 
bool UTILS::FONT::GetFontFamilyNames (const std::vector< uint8_t > &buffer, std::set< std::string > &familyNames)
 Get the font family name from a font file, in case of font collection (.ttc) will take the family name of all fonts.
 
bool UTILS::FONT::GetFontFamilyNames (const std::string &filepath, std::set< std::string > &familyNames)
 Get the font family name from a font file, in case of font collection (.ttc) will take the family name of all fonts.
 
std::string UTILS::FONT::GetFontFamily (std::vector< uint8_t > &buffer)
 Get the font family name from a font file, in case of font collection (.ttc) will take the first available.
 
std::string UTILS::FONT::GetFontFamily (const std::string &filepath)
 Get the font family name from a font file, in case of font collection (.ttc) will take the first available.
 
bool UTILS::FONT::IsSupportedFontExtension (const std::string &filepath)
 Check if a filename have a supported font extension.
 
void UTILS::FONT::ClearTemporaryFonts ()
 Removes all temporary fonts, e.g.those extract from MKV containers that are only available during playback.
 

Variables

constexpr const char * UTILS::FONT::SUPPORTED_EXTENSIONS_MASK = ".ttf|.ttc|.otf"
 
constexpr const char * UTILS::FONT::FONT_DEFAULT_FILENAME = "arial.ttf"
 
constexpr const char * UTILS::FONT::FONTPATH::SYSTEM = "special://xbmc/media/Fonts/"
 
constexpr const char * UTILS::FONT::FONTPATH::USER = "special://home/media/Fonts/"
 
constexpr const char * UTILS::FONT::FONTPATH::TEMP = "special://temp/fonts/"