feat(Fonts): Added Storopia font

This commit is contained in:
Yimura 2021-05-21 12:16:10 +02:00
parent d267132f85
commit bf928d36d2
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682
5 changed files with 7506 additions and 10 deletions

View File

@ -1,4 +0,0 @@
#pragma once
#include <cstdint>
extern const std::uint8_t font_rubik[140732];

View File

@ -0,0 +1,4 @@
#pragma once
extern const unsigned char font_rubik[140732];
extern const unsigned char font_storopia[89888];

View File

@ -1,5 +1,4 @@
#pragma once
#include "fonts.hpp"
#include "fonts/fonts.hpp"
const std::uint8_t font_rubik[140732]
{
@ -11731,4 +11730,4 @@ const std::uint8_t font_rubik[140732]
0x05, 0x1a, 0x07, 0x05, 0x0c, 0x2a, 0xb8, 0x01, 0xff, 0x85, 0xb0, 0x04,
0x8d, 0xb1, 0x02, 0x00, 0x44, 0xb3, 0x05, 0x64, 0x06, 0x00, 0x44, 0x44,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
};
};

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
#include "common.hpp"
#include "fonts.hpp"
#include "fonts/fonts.hpp"
#include "logger.hpp"
#include "gui.hpp"
#include "pointers.hpp"
@ -51,9 +51,10 @@ namespace big
ImFontConfig font_cfg{};
font_cfg.FontDataOwnedByAtlas = false;
std::strcpy(font_cfg.Name, "Rubik");
std::strcpy(font_cfg.Name, "Storopia");
m_font = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_rubik), sizeof(font_rubik), 20.f, &font_cfg);
m_font = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_storopia), sizeof(font_storopia), 20.f, &font_cfg);
//m_font = ImGui::GetIO().Fonts->AddFontFromMemoryTTF(const_cast<std::uint8_t*>(font_rubik), sizeof(font_rubik), 20.f, &font_cfg);
m_monospace_font = ImGui::GetIO().Fonts->AddFontDefault();
g_gui.dx_init();