From 260e533214c25a6ad3956d94f58d667a88c025bc Mon Sep 17 00:00:00 2001 From: chatlanin Date: Tue, 25 Apr 2023 12:19:35 +0300 Subject: [PATCH] fix fonts --- src/sandbox/layers/test_panel/test_panel.cpp | 6 ++- src/try_engine/gui/style/fonts.hpp | 46 ++++++++++---------- src/try_engine/gui/style/icons.hpp | 2 +- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/sandbox/layers/test_panel/test_panel.cpp b/src/sandbox/layers/test_panel/test_panel.cpp index d3908cc..71d01cc 100644 --- a/src/sandbox/layers/test_panel/test_panel.cpp +++ b/src/sandbox/layers/test_panel/test_panel.cpp @@ -21,12 +21,16 @@ 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))) { em->execute(std::string("asdf"), "asdf"); } - + // ImGui::Text(try_engine::style::icon::ICON_PAINT_BRUSH " Paint" ); ImGui::Text("\xef\x87\xbc"); diff --git a/src/try_engine/gui/style/fonts.hpp b/src/try_engine/gui/style/fonts.hpp index d355c97..7d39d1c 100644 --- a/src/try_engine/gui/style/fonts.hpp +++ b/src/try_engine/gui/style/fonts.hpp @@ -10,8 +10,8 @@ namespace try_engine::style::fonts { - inline std::vector 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 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 { @@ -42,15 +42,15 @@ namespace try_engine::style::fonts FONT_PATH + "Montserrat/Montserrat-Light.ttf", FONT_PATH + "Montserrat/Montserrat-LightItalic.ttf", - + FONT_PATH + "Montserrat/Montserrat-Medium.ttf", FONT_PATH + "Montserrat/Montserrat-MediumItalic.ttf", - + FONT_PATH + "Montserrat/Montserrat-Regular.ttf", FONT_PATH + "Montserrat/Montserrat-SemiBold.ttf", FONT_PATH + "Montserrat/Montserrat-SemiBoldItalic.ttf", - + FONT_PATH + "Montserrat/Montserrat-Thin.ttf", FONT_PATH + "Montserrat/Montserrat-ThinItalic.ttf" }; @@ -58,24 +58,24 @@ namespace try_engine::style::fonts inline std::map 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() diff --git a/src/try_engine/gui/style/icons.hpp b/src/try_engine/gui/style/icons.hpp index 5da1f82..a647e15 100644 --- a/src/try_engine/gui/style/icons.hpp +++ b/src/try_engine/gui/style/icons.hpp @@ -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";