Files
MuditaOS/module-gui/test/mock/InitializedFontManager.cpp
pholat fb586cb4e9 EGD-3229 (#497)
* EGD-3229 text helper classes added with tests - used in tests, plus misc utils needed

No major actual functionality changed - TextClasses added with this PR
are used in tests only in this commit.
* classes needed to rewrite gui::Text added
* some utilities needed to rewrite gui::Text added
* tests added
2020-07-06 16:19:41 +02:00

18 lines
420 B
C++

#include "InitializedFontManager.hpp"
#include <mutex>
namespace mockup
{
auto guard = std::mutex();
auto fontManager() -> gui::FontManager &
{
std::lock_guard<std::mutex> scoped(guard);
auto &fontmanager = gui::FontManager::getInstance();
if (!fontmanager.isInitialized()) {
fontmanager.init("assets");
}
return fontmanager;
}
} // namespace mockup