refactor font loading

This commit is contained in:
2019-12-01 18:24:59 +01:00
parent 0905827b8d
commit c8bce21b95
30 changed files with 180 additions and 84 deletions

View File

@@ -13,10 +13,11 @@ public:
};
TextMesh m_text_mesh;
std::string m_text;
std::string m_font = "arial";
std::string m_font_name = "roboto";
glm::vec4 m_color{ 1, 1, 1, 1 };
std::string m_font_weight = "regular";
int m_font_size = 17;
std::string font_id;
bool m_font_italic = false;
bool m_multiline = false;
glm::vec2 m_off = { 0, 0 };
@@ -32,6 +33,7 @@ public:
void set_text(const std::string& s);
void set_text_format(const char* fmt, ...);
void set_font(const std::string& fontID);
void set_font(const std::string& name, int size, const std::string& weight, bool italic);
void set_font_size(int size);
void update_layout();
};