fix fonts

This commit is contained in:
chatlanin 2023-04-25 12:19:35 +03:00
parent 6e38f68d9f
commit 260e533214
3 changed files with 29 additions and 25 deletions

View File

@ -21,6 +21,10 @@ namespace tr::layers
BEGIN_IMGUI_WIN();
if (ImGui::Button("RUN", ImVec2(28, 30))) {
em->execute(std::string("asdf"), "asdf");
}
TR_PUSH_FONT(ICON, 18);
if (ImGui::Button(try_engine::style::icon::ICON_STOP, ImVec2(28, 30))) {

View File

@ -10,8 +10,8 @@
namespace try_engine::style::fonts
{
inline std::vector<float> font_size = { 8.f, 9.f, 10.f, 11.f, 12.f, 13.f, 14.f, 15.f, 16.f, 17.f, 18.f, 19.f, 20.f,
21.f, 22.f, 23.f, 24.f, 25.f, 26.f, 27.f, 28.f, 29.f, 30.f, 31.f, 32.f, 33.f };
inline std::vector<float> font_size = { 8.f, 9.f, 10.f, 11.f, 12.f, 13.f, 14.f, 15.f,
16.f, 17.f, 18.f, 19.f, 20.f, 21.f, 22.f, 23.f, 24.f};
enum font_type
{
@ -58,24 +58,24 @@ namespace try_engine::style::fonts
inline std::map<font_type, int> font_step
{
{ font_type::BLACK, 0 },
{ font_type::BLACK_ITALIC, 26 },
{ font_type::BOLD, 52 },
{ font_type::BOLD_ITALIC, 78 },
{ font_type::EXTRA_BOLD, 104 },
{ font_type::EXTRA_BOLD_ITALIC, 130 },
{ font_type::EXTRA_LIGHT, 156 },
{ font_type::EXTRA_LIGHT_ITALIC, 182 },
{ font_type::ITALIC, 208 },
{ font_type::LIGHT, 234 },
{ font_type::LIGHT_ITALIC, 260 },
{ font_type::MEDIUM, 286 },
{ font_type::MEDIUM_ITALIC, 312 },
{ font_type::REGULAR, 338 },
{ font_type::SEMI_BOLD, 364 },
{ font_type::SEMI_BOLD_ITALIC, 390 },
{ font_type::THIN, 416 },
{ font_type::THIN_ITALIC, 442 },
{ font_type::ICON, 468 },
{ font_type::BLACK_ITALIC, 17 },
{ font_type::BOLD, 34 },
{ font_type::BOLD_ITALIC, 51 },
{ font_type::EXTRA_BOLD, 68 },
{ font_type::EXTRA_BOLD_ITALIC, 85 },
{ font_type::EXTRA_LIGHT, 102 },
{ font_type::EXTRA_LIGHT_ITALIC, 119 },
{ font_type::ITALIC, 136 },
{ font_type::LIGHT, 153 },
{ font_type::LIGHT_ITALIC, 170 },
{ font_type::MEDIUM, 187 },
{ font_type::MEDIUM_ITALIC, 204 },
{ font_type::REGULAR, 221 },
{ font_type::SEMI_BOLD, 238 },
{ font_type::SEMI_BOLD_ITALIC, 255 },
{ font_type::THIN, 272 },
{ font_type::THIN_ITALIC, 289 },
{ font_type::ICON, 306 },
};
inline void init()

View File

@ -140,7 +140,7 @@ namespace try_engine::style::icon
inline const char* ICON_SIGN_OUT = "\uf08b";
inline const char* ICON_LINKEDIN_SQUARE = "\uf08c";
inline const char* ICON_THUMB_TACK = "\uf08d";
inline const char* ICON_inlineAL_LINK = "\uf08e";
inline const char* ICON_INLINEAL_LINK = "\uf08e";
inline const char* ICON_SIGN_IN = "\uf090";
inline const char* ICON_TROPHY = "\uf091";
inline const char* ICON_GITHUB_SQUARE = "\uf092";