fix: Font size not resetting back to default properly
This commit is contained in:
parent
cbf82d7476
commit
eae73b3113
@ -119,6 +119,9 @@ namespace hex::plugin::builtin {
|
|||||||
bool loadFontsImpl(bool loadUnicode) {
|
bool loadFontsImpl(bool loadUnicode) {
|
||||||
const float defaultFontSize = ImHexApi::System::DefaultFontSize * std::round(ImHexApi::System::getGlobalScale());
|
const float defaultFontSize = ImHexApi::System::DefaultFontSize * std::round(ImHexApi::System::getGlobalScale());
|
||||||
|
|
||||||
|
// Reset used font size back to the default size
|
||||||
|
ImHexApi::System::impl::setFontSize(defaultFontSize);
|
||||||
|
|
||||||
// Load custom font related settings
|
// Load custom font related settings
|
||||||
if (ContentRegistry::Settings::read("hex.builtin.setting.font", "hex.builtin.setting.font.custom_font_enable", false).get<bool>()) {
|
if (ContentRegistry::Settings::read("hex.builtin.setting.font", "hex.builtin.setting.font.custom_font_enable", false).get<bool>()) {
|
||||||
std::fs::path fontFile = ContentRegistry::Settings::read("hex.builtin.setting.font", "hex.builtin.setting.font.font_path", "").get<std::string>();
|
std::fs::path fontFile = ContentRegistry::Settings::read("hex.builtin.setting.font", "hex.builtin.setting.font.font_path", "").get<std::string>();
|
||||||
|
Loading…
Reference in New Issue
Block a user