Horizon
Loading...
Searching...
No Matches
text_data.hpp
1#pragma once
2#include "common/common.hpp"
3#include <vector>
4#include "common/lut.hpp"
5
6namespace horizon {
7class TextData {
8public:
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 static const LutEnumStr<TextData::Font> font_lut;
24
25 using Buffer = std::vector<std::pair<Coordi, Coordi>>;
26 TextData(Buffer &buf, const std::string &s, Font font = Font::SIMPLEX);
27 Buffer &lines;
28 int ymin = 0;
29 int ymax = 0;
30 int xmin = 100;
31 int xmax = 0;
32 int xright = 0;
33
34 static std::string trim(const std::string &s);
35};
36} // namespace horizon
Definition lut.hpp:18
Definition text_data.hpp:7