refactor font loading
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user