15 lines
384 B
C++
15 lines
384 B
C++
#pragma once
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
#include "stb_truetype.h"
|
|
|
|
class FontManager {
|
|
public:
|
|
bool LoadFont(const std::string& id, const std::string& path);
|
|
stbtt_fontinfo* GetFont(const std::string& id);
|
|
|
|
private:
|
|
std::unordered_map<std::string, std::vector<unsigned char>> fontBuffers;
|
|
std::unordered_map<std::string, stbtt_fontinfo> fonts;
|
|
}; |