Add logging in font loading
parent
1b21c387bb
commit
0256b1aa39
|
@ -29,6 +29,8 @@
|
|||
CSDLMemoryWrapper::CSDLMemoryWrapper(const std::string& filename)
|
||||
: m_rwops(nullptr)
|
||||
{
|
||||
GetLogger()->Trace("Opening SDL memory wrapper for file '%s'\n", filename.c_str());
|
||||
|
||||
if (!PHYSFS_isInit())
|
||||
{
|
||||
GetLogger()->Error("PHYSFS not initialized!\n");
|
||||
|
|
|
@ -983,9 +983,10 @@ CachedFont* CText::GetOrOpenFont(FontType font, float size)
|
|||
auto file = CResourceManager::GetSDLMemoryHandler(mf->fileName);
|
||||
if (!file->IsOpen())
|
||||
{
|
||||
m_error = std::string("Unable to open file");
|
||||
m_error = std::string("Unable to open file '") + mf->fileName + "' (font size = " + StrUtils::ToString<float>(size) + ")";
|
||||
return nullptr;
|
||||
}
|
||||
GetLogger()->Debug("Loaded font file %s (font size = %.1f)\n", mf->fileName.c_str(), size);
|
||||
|
||||
auto newFont = MakeUnique<CachedFont>(std::move(file), pointSize);
|
||||
if (newFont->font == nullptr)
|
||||
|
|
Loading…
Reference in New Issue