21 lines
503 B
C++
21 lines
503 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <unordered_map>
|
|
|
|
#include <ft2build.h>
|
|
#include FT_FREETYPE_H
|
|
|
|
namespace gz {
|
|
class FontManager {
|
|
public:
|
|
FontManager(const std::string&& fontDir);
|
|
void loadFont(const std::string& font);
|
|
const std::unordered_map<std::string, FT_Face>& getFaces() const { return faces; }
|
|
private:
|
|
FT_Library freetype;
|
|
std::string fontDir;
|
|
std::unordered_map<std::string, FT_Face> faces;
|
|
};
|
|
}
|