mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
build: Update ImGui to v1.92.1 (#2325)
Update ImGui to the latest version and rewrite most of the font handling code
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include <hex/api/imhex_api.hpp>
|
||||
|
||||
#include <fonts/fonts.hpp>
|
||||
|
||||
#include <romfs/romfs.hpp>
|
||||
|
||||
#include <hex/helpers/utils.hpp>
|
||||
@@ -9,6 +11,13 @@
|
||||
|
||||
namespace hex::fonts {
|
||||
|
||||
static auto s_defaultFont = ImHexApi::Fonts::Font("hex.fonts.font.default");
|
||||
const ImHexApi::Fonts::Font& Default() { return s_defaultFont; }
|
||||
static auto s_hexEditorFont = ImHexApi::Fonts::Font("hex.fonts.font.hex_editor");
|
||||
const ImHexApi::Fonts::Font& HexEditor() { return s_hexEditorFont; }
|
||||
static auto s_codeEditorFont = ImHexApi::Fonts::Font("hex.fonts.font.code_editor");
|
||||
const ImHexApi::Fonts::Font& CodeEditor() { return s_codeEditorFont; }
|
||||
|
||||
void registerFonts() {
|
||||
using namespace ImHexApi::Fonts;
|
||||
|
||||
@@ -24,7 +33,7 @@ namespace hex::fonts {
|
||||
{
|
||||
{ ICON_MIN_VS, ICON_MAX_VS }
|
||||
},
|
||||
{ -1_scaled, -1_scaled });
|
||||
{ -1, -2 });
|
||||
|
||||
ImHexApi::Fonts::loadFont("Unifont", romfs::get("fonts/unifont.otf").span<u8>(), { }, {}, 0, false, 16);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user