Clean up fontsmanager

This commit is contained in:
jmsgrogan 2023-01-12 11:54:08 +00:00
parent 076e32b1d6
commit 64f0b3e77a
26 changed files with 111 additions and 89 deletions

View file

@ -8,11 +8,11 @@
#include "FontGlyph.h"
FontsManager::FontsManager()
{
#ifdef HAS_FREETYPE
mFontEngine = std::make_unique<FreeTypeFontEngine>();
mUsesGlyphs = true;
#else
mFontEngine = std::make_unique<BasicFontEngine>();
#endif
@ -24,6 +24,11 @@ std::unique_ptr<FontsManager> FontsManager::Create()
return std::make_unique<FontsManager>();
}
bool FontsManager::usesGlyphs() const
{
return mUsesGlyphs;
}
IFontEngine* FontsManager::getFontEngine() const
{
return mFontEngine.get();