16 Font(
Logger* pLogger, IDirect3DDevice9* pDevice,
int width,
int height, std::string name, std::string prmPathAndFilename)
24 sprintf_s(err, 256,
"Font::ctor AddFontResourceExA: %s",
pathAndFilename.c_str());
27 const int fontsAdded = AddFontResourceExA(
pathAndFilename.c_str(), FR_PRIVATE,
nullptr);
30 sprintf_s(err, 256,
"Font::ctor AddFontResourceExA: %s",
pathAndFilename.c_str());
35 if (FAILED(hr = D3DXCreateFontA(pDevice, height, width, FW_MEDIUM, 1,
false, DEFAULT_CHARSET,
36 OUT_TT_ONLY_PRECIS, ANTIALIASED_QUALITY, DEFAULT_PITCH | FF_DONTCARE,
37 name.c_str(), &
pFont)))
39 sprintf_s(err, 256,
"Font::ctor D3DXCreateFontA failed: %s", name.c_str());
Font(Logger *pLogger, IDirect3DDevice9 *pDevice, int width, int height, std::string name, std::string prmPathAndFilename)
void Log(const char *msg, Level level=Info, int errorCode=0)
std::string pathAndFilename
void AddToCallStack(const char *msg)