fix some fonts size

This commit is contained in:
chatlanin 2023-04-25 12:34:08 +03:00
parent 260e533214
commit dcd59de7e9

View File

@ -10,12 +10,13 @@
namespace try_engine::style::fonts namespace try_engine::style::fonts
{ {
inline std::string font_name = "Montserrat/Montserrat-";
inline std::vector<float> font_size = { 8.f, 9.f, 10.f, 11.f, 12.f, 13.f, 14.f, 15.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}; 16.f, 17.f, 18.f, 19.f, 20.f, 21.f, 22.f };
enum font_type enum font_type
{ {
BLACK, BLACK_ITALIC, BOLD, BOLD_ITALIC, EXTRA_BOLD, EXTRA_BOLD_ITALIC, EXTRA_LIGHT, EXTRA_LIGHT_ITALIC, BOLD, BOLD_ITALIC, EXTRA_BOLD, EXTRA_BOLD_ITALIC, EXTRA_LIGHT, EXTRA_LIGHT_ITALIC,
ITALIC, LIGHT, LIGHT_ITALIC, MEDIUM, MEDIUM_ITALIC, REGULAR, SEMI_BOLD, SEMI_BOLD_ITALIC, THIN, THIN_ITALIC, ICON ITALIC, LIGHT, LIGHT_ITALIC, MEDIUM, MEDIUM_ITALIC, REGULAR, SEMI_BOLD, SEMI_BOLD_ITALIC, THIN, THIN_ITALIC, ICON
}; };
@ -26,56 +27,52 @@ namespace try_engine::style::fonts
inline std::vector<std::string> fonts_path inline std::vector<std::string> fonts_path
{ {
FONT_PATH + "Montserrat/Montserrat-Black.ttf",
FONT_PATH + "Montserrat/Montserrat-BlackItalic.ttf",
FONT_PATH + "Montserrat/Montserrat-Bold.ttf", FONT_PATH + font_name + "Bold.ttf",
FONT_PATH + "Montserrat/Montserrat-BoldItalic.ttf", FONT_PATH + font_name + "BoldItalic.ttf",
FONT_PATH + "Montserrat/Montserrat-ExtraBold.ttf", FONT_PATH + font_name + "ExtraBold.ttf",
FONT_PATH + "Montserrat/Montserrat-ExtraBoldItalic.ttf", FONT_PATH + font_name + "ExtraBoldItalic.ttf",
FONT_PATH + "Montserrat/Montserrat-ExtraLight.ttf", FONT_PATH + font_name + "ExtraLight.ttf",
FONT_PATH + "Montserrat/Montserrat-ExtraLightItalic.ttf", FONT_PATH + font_name + "ExtraLightItalic.ttf",
FONT_PATH + "Montserrat/Montserrat-Italic.ttf", FONT_PATH + font_name + "Italic.ttf",
FONT_PATH + "Montserrat/Montserrat-Light.ttf", FONT_PATH + font_name + "Light.ttf",
FONT_PATH + "Montserrat/Montserrat-LightItalic.ttf", FONT_PATH + font_name + "LightItalic.ttf",
FONT_PATH + "Montserrat/Montserrat-Medium.ttf", FONT_PATH + font_name + "Medium.ttf",
FONT_PATH + "Montserrat/Montserrat-MediumItalic.ttf", FONT_PATH + font_name + "MediumItalic.ttf",
FONT_PATH + "Montserrat/Montserrat-Regular.ttf", FONT_PATH + font_name + "Regular.ttf",
FONT_PATH + "Montserrat/Montserrat-SemiBold.ttf", FONT_PATH + font_name + "SemiBold.ttf",
FONT_PATH + "Montserrat/Montserrat-SemiBoldItalic.ttf", FONT_PATH + font_name + "SemiBoldItalic.ttf",
FONT_PATH + "Montserrat/Montserrat-Thin.ttf", FONT_PATH + font_name + "Thin.ttf",
FONT_PATH + "Montserrat/Montserrat-ThinItalic.ttf" FONT_PATH + font_name + "ThinItalic.ttf"
}; };
inline std::map<font_type, int> font_step inline std::map<font_type, int> font_step
{ {
{ font_type::BLACK, 0 }, { font_type::BOLD, 0 },
{ font_type::BLACK_ITALIC, 17 }, { font_type::BOLD_ITALIC, 15 },
{ font_type::BOLD, 34 }, { font_type::EXTRA_BOLD, 30 },
{ font_type::BOLD_ITALIC, 51 }, { font_type::EXTRA_BOLD_ITALIC, 45 },
{ font_type::EXTRA_BOLD, 68 }, { font_type::EXTRA_LIGHT, 60 },
{ font_type::EXTRA_BOLD_ITALIC, 85 }, { font_type::EXTRA_LIGHT_ITALIC, 75 },
{ font_type::EXTRA_LIGHT, 102 }, { font_type::ITALIC, 90 },
{ font_type::EXTRA_LIGHT_ITALIC, 119 }, { font_type::LIGHT, 105 },
{ font_type::ITALIC, 136 }, { font_type::LIGHT_ITALIC, 120 },
{ font_type::LIGHT, 153 }, { font_type::MEDIUM, 135 },
{ font_type::LIGHT_ITALIC, 170 }, { font_type::MEDIUM_ITALIC, 150 },
{ font_type::MEDIUM, 187 }, { font_type::REGULAR, 165 },
{ font_type::MEDIUM_ITALIC, 204 }, { font_type::SEMI_BOLD, 180 },
{ font_type::REGULAR, 221 }, { font_type::SEMI_BOLD_ITALIC, 195 },
{ font_type::SEMI_BOLD, 238 }, { font_type::THIN, 210 },
{ font_type::SEMI_BOLD_ITALIC, 255 }, { font_type::THIN_ITALIC, 225 },
{ font_type::THIN, 272 }, { font_type::ICON, 240 },
{ font_type::THIN_ITALIC, 289 },
{ font_type::ICON, 306 },
}; };
inline void init() inline void init()