mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 20:15:38 +00:00
Fixed a bug with empty font paths not resolving correctly.
This commit is contained in:
parent
886bf7b00b
commit
5aeb2bc87f
|
@ -109,7 +109,7 @@ std::shared_ptr<Font> Font::get(int size, const std::string& path)
|
||||||
return foundFont->second.lock();
|
return foundFont->second.lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Font> font = std::shared_ptr<Font>(new Font(size, path));
|
std::shared_ptr<Font> font = std::shared_ptr<Font>(new Font(def.second, def.first));
|
||||||
sFontMap[def] = std::weak_ptr<Font>(font);
|
sFontMap[def] = std::weak_ptr<Font>(font);
|
||||||
ResourceManager::getInstance()->addReloadable(font);
|
ResourceManager::getInstance()->addReloadable(font);
|
||||||
return font;
|
return font;
|
||||||
|
@ -138,7 +138,7 @@ void Font::buildAtlas(ResourceData data)
|
||||||
{
|
{
|
||||||
if(FT_New_Memory_Face(sLibrary, data.ptr.get(), data.length, 0, &face))
|
if(FT_New_Memory_Face(sLibrary, data.ptr.get(), data.length, 0, &face))
|
||||||
{
|
{
|
||||||
LOG(LogError) << "Error creating font face!";
|
LOG(LogError) << "Error creating font face! (mPath: " << mPath << ", data.length: " << data.length << ")";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue