#include <C4FontLoader.h>
Public Types | |
enum | FontType { C4FT_Log , C4FT_MainSmall , C4FT_Main , C4FT_Caption , C4FT_Title } |
Public Member Functions | |
C4FontLoader ()=default | |
~C4FontLoader () | |
void | Clear () |
bool | InitFont (CStdFont *Font, const char *szFontName, FontType eType, int32_t iSize, C4GroupSet *pGfxGroups, bool fDoShadow=true) |
Protected Member Functions | |
CStdVectorFont * | CreateFont (StdBuf &Data) |
CStdVectorFont * | CreateFont (const char *szFaceName) |
void | DestroyFont (CStdVectorFont *pFont) |
Protected Attributes | |
CStdVectorFont * | pLastUsedFont {nullptr} |
StdCopyStrBuf | LastUsedName |
int32_t | LastUsedGrpID {0} |
Friends | |
class | CStdFont |
Definition at line 46 of file C4FontLoader.h.
Enumerator | |
---|---|
C4FT_Log | |
C4FT_MainSmall | |
C4FT_Main | |
C4FT_Caption | |
C4FT_Title |
Definition at line 50 of file C4FontLoader.h.
|
default |
|
inline |
Definition at line 53 of file C4FontLoader.h.
References Clear().
void C4FontLoader::Clear | ( | ) |
Definition at line 172 of file C4FontLoader.cpp.
References DestroyFont(), and pLastUsedFont.
Referenced by C4Game::Clear(), and ~C4FontLoader().
|
protected |
Definition at line 259 of file C4FontLoader.cpp.
|
protected |
Definition at line 263 of file C4FontLoader.cpp.
Referenced by InitFont().
|
protected |
Definition at line 267 of file C4FontLoader.cpp.
References CStdVectorFont::RefCnt.
Referenced by Clear(), CStdFont::Clear(), and InitFont().
bool C4FontLoader::InitFont | ( | CStdFont * | Font, |
const char * | szFontName, | ||
FontType | eType, | ||
int32_t | iSize, | ||
C4GroupSet * | pGfxGroups, | ||
bool | fDoShadow = true |
||
) |
Definition at line 40 of file C4FontLoader.cpp.
References _MAX_PATH_LEN, C4FT_Caption, C4FT_Log, C4FT_Main, C4FT_MainSmall, C4FT_Title, C4MaxName, CStdFont::Clear(), CreateFont(), DestroyFont(), C4GroupSet::FindSuitableFile(), FormatString(), FW_NORMAL, CStdFont::Init(), CStdFont::IsInitialized(), iSize, CStdFont::IsSameAs(), LastUsedGrpID, LastUsedName, C4Group::LoadEntry(), LoadResStr(), LogF(), LogFatal(), pLastUsedFont, SCopySegment(), and SCopyUntil().
Referenced by C4GraphicsResource::InitFonts(), C4StartupGraphics::InitFonts(), and C4Application::SetGameFont().
|
friend |
Definition at line 69 of file C4FontLoader.h.
|
protected |
Definition at line 64 of file C4FontLoader.h.
Referenced by InitFont().
|
protected |
Definition at line 63 of file C4FontLoader.h.
Referenced by InitFont().
|
protected |
Definition at line 62 of file C4FontLoader.h.
Referenced by Clear(), and InitFont().