#pragma once

#include "IFontEngine.h"
#include "FontGlyph.h" 

#include <memory>
#include <string>
#include <unordered_map>

class FontsManager
{
public:
    FontsManager();
    static std::unique_ptr<FontsManager> Create();

    IFontEngine* getFontEngine() const;

    bool usesGlyphs() const;

    FontGlyph* getGlyph(const std::string& fontFace, float size, uint32_t c);

private:
    bool mUsesGlyphs{ false };
    std::unique_ptr<IFontEngine> mFontEngine;
    std::unordered_map<uint32_t, std::unique_ptr<FontGlyph> > mGlyphs;
};

using FontsManagerPtr = std::unique_ptr<FontsManager>;
