Symphony Of Empires
ttf.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <memory>
5 #include <unordered_map>
6 
7 namespace Eng3D {
8  namespace IO::Asset {
9  struct Base;
10  }
11  class State;
12 }
13 
14 namespace Eng3D::TrueType {
15  struct Font {
16  Font() = delete;
17  Font(std::shared_ptr<Eng3D::IO::Asset::Base> asset, int dpi);
18  Font(const Font&) = delete;
19  Font& operator=(const Font&) = delete;
20  ~Font();
21  void* sdl_font;
22  };
23 
24  class Manager {
25  std::unordered_map<std::string, std::shared_ptr<Eng3D::TrueType::Font>> fonts;
26  Eng3D::State& s;
27  public:
28  Manager() = delete;
30  Manager(const Manager&) = delete;
31  Manager& operator=(const Manager&) = delete;
32  ~Manager();
33  std::shared_ptr<Eng3D::TrueType::Font> load(std::shared_ptr<Eng3D::IO::Asset::Base> asset);
34  };
35 }
std::shared_ptr< Eng3D::TrueType::Font > load(std::shared_ptr< Eng3D::IO::Asset::Base > asset)
Definition: ttf.cpp:58
Manager & operator=(const Manager &)=delete
Manager(const Manager &)=delete
Font(const Font &)=delete
Font & operator=(const Font &)=delete