Files
2026-06-01 12:46:52 +02:00

40 lines
760 B
C++

#ifdef _COUNTRY_ME_
#pragma once
#include <toolkit/Singleton.h>
//#include <string>
#include <map>
class KFontManager : public CSingleton < KFontManager >
{
public:
static const char *KDEFAULT_FONT_NAME;
static const int KDEFAULT_FONT_SIZE;
std::string m_strDefaultFontFace;
typedef std::map < std::string, std::string > fontmap;
typedef fontmap::iterator ifontmap;
fontmap m_mapFonts;
public:
bool Create( LPCTSTR strFontFace );
void Destroy();
std::string GetFaceName( LPCSTR lpszFontName );
LPCSTR AddFont( LPCSTR lpszName, LPCSTR lpszTypeFaceName );
static std::string GetDefaultFaceName()
{
return GetInstance()->GetFaceName( KDEFAULT_FONT_NAME );
}
static int GetDefaultFontSize()
{
return KDEFAULT_FONT_SIZE;
}
};
#endif