Horizon
text_data.hpp
1 #pragma once
2 #include "common/common.hpp"
3 #include <vector>
4 
5 
6 namespace horizon {
7 class TextData {
8 public:
9  enum class Font {
10  SMALL,
11  SMALL_ITALIC,
12  SIMPLEX,
13  COMPLEX_SMALL,
14  COMPLEX_SMALL_ITALIC,
15  DUPLEX,
16  COMPLEX,
17  COMPLEX_ITALIC,
18  TRIPLEX,
19  TRIPLEX_ITALIC,
20  SCRIPT_SIMPLEX,
21  SCRIPT_COMPLEX
22  };
23  using Buffer = std::vector<std::pair<Coordi, Coordi>>;
24  TextData(Buffer &buf, const std::string &s, Font font = Font::SIMPLEX);
25  Buffer &lines;
26  int ymin = 0;
27  int ymax = 0;
28  int xmin = 100;
29  int xmax = 0;
30  int xright = 0;
31 
32  static std::string trim(const std::string &s);
33 };
34 } // namespace horizon
Definition: text_data.hpp:7