Smallcase folders part 1
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include "Display/UI/Text/Font.h"
|
||||
#include "Display/UI/Text/Glyph.h"
|
||||
#include "Display/UI/Text/GlyphKey.h"
|
||||
|
||||
namespace display::ui::text
|
||||
{
|
||||
class Fonts
|
||||
{
|
||||
public:
|
||||
Fonts();
|
||||
~Fonts();
|
||||
|
||||
const Glyph &getGlyph(char ch, const Font &key);
|
||||
|
||||
private:
|
||||
struct Library;
|
||||
struct Face;
|
||||
std::unique_ptr<Library> library;
|
||||
std::unordered_map<Font, std::unique_ptr<Face>, FontHash> fonts;
|
||||
std::unordered_map<GlyphKey, Glyph, GlyphKeyHash> glyphs;
|
||||
void loadAllFonts();
|
||||
void loadFonts(const std::string &path);
|
||||
};
|
||||
} // namespace display::ui::text
|
||||
Reference in New Issue
Block a user