diff --git a/main/source/init/tasks.cpp b/main/source/init/tasks.cpp index 6c0d3c579..53a7aa654 100644 --- a/main/source/init/tasks.cpp +++ b/main/source/init/tasks.cpp @@ -142,7 +142,10 @@ namespace hex::init { fonts->AddFontFromMemoryCompressedTTF(font_awesome_compressed_data, font_awesome_compressed_size, fontSize, &cfg, fontAwesomeRange); fonts->AddFontFromMemoryCompressedTTF(codicons_compressed_data, codicons_compressed_size, fontSize, &cfg, codiconsRange); - fonts->AddFontFromMemoryCompressedTTF(unifont_compressed_data, unifont_compressed_size, fontSize, &cfg, unifontRange); + + bool enableUnicode = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.enable_unicode", true); + if (enableUnicode) + fonts->AddFontFromMemoryCompressedTTF(unifont_compressed_data, unifont_compressed_size, fontSize, &cfg, unifontRange); fonts->Build(); diff --git a/plugins/builtin/source/content/settings_entries.cpp b/plugins/builtin/source/content/settings_entries.cpp index 85bd61de6..793e4e4ee 100644 --- a/plugins/builtin/source/content/settings_entries.cpp +++ b/plugins/builtin/source/content/settings_entries.cpp @@ -68,6 +68,17 @@ namespace hex::plugin::builtin { return false; }); + ContentRegistry::Settings::add("hex.builtin.setting.general", "hex.builtin.setting.general.enable_unicode", 1, [](auto name, nlohmann::json &setting) { + static bool enabled = static_cast(setting); + + if (ImGui::Checkbox(name.data(), &enabled)) { + setting = static_cast(enabled); + return true; + } + + return false; + }); + /* Interface */ ContentRegistry::Settings::add("hex.builtin.setting.interface", "hex.builtin.setting.interface.color", 0, [](auto name, nlohmann::json &setting) { diff --git a/plugins/builtin/source/lang/de_DE.cpp b/plugins/builtin/source/lang/de_DE.cpp index 5a7172fc4..cd6090ee1 100644 --- a/plugins/builtin/source/lang/de_DE.cpp +++ b/plugins/builtin/source/lang/de_DE.cpp @@ -780,6 +780,7 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.general.show_tips", "Tipps beim start anzeigen" }, { "hex.builtin.setting.general.auto_load_patterns", "Automatisches Pattern laden" }, { "hex.builtin.setting.general.sync_pattern_source", "Pattern Source Code zwischen Providern synchronisieren" }, + // { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" }, { "hex.builtin.setting.interface", "Aussehen" }, { "hex.builtin.setting.interface.color", "Farbthema" }, { "hex.builtin.setting.interface.color.system", "System" }, diff --git a/plugins/builtin/source/lang/en_US.cpp b/plugins/builtin/source/lang/en_US.cpp index 03524a47b..d752b78f7 100644 --- a/plugins/builtin/source/lang/en_US.cpp +++ b/plugins/builtin/source/lang/en_US.cpp @@ -785,6 +785,7 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.general.show_tips", "Show tips on startup" }, { "hex.builtin.setting.general.auto_load_patterns", "Auto-load supported pattern" }, { "hex.builtin.setting.general.sync_pattern_source", "Sync pattern source code between providers" }, + { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" }, { "hex.builtin.setting.interface", "Interface" }, { "hex.builtin.setting.interface.color", "Color theme" }, { "hex.builtin.setting.interface.color.system", "System" }, diff --git a/plugins/builtin/source/lang/it_IT.cpp b/plugins/builtin/source/lang/it_IT.cpp index dc4eeca24..61652c2f2 100644 --- a/plugins/builtin/source/lang/it_IT.cpp +++ b/plugins/builtin/source/lang/it_IT.cpp @@ -789,6 +789,7 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.general.show_tips", "Mostra consigli all'avvio" }, { "hex.builtin.setting.general.auto_load_patterns", "Auto-caricamento del pattern supportato" }, // { "hex.builtin.setting.general.sync_pattern_source", "Sync pattern source code between providers" }, + // { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" }, { "hex.builtin.setting.interface", "Interfaccia" }, { "hex.builtin.setting.interface.color", "Colore del Tema" }, { "hex.builtin.setting.interface.color.system", "Sistema" }, diff --git a/plugins/builtin/source/lang/ja_JP.cpp b/plugins/builtin/source/lang/ja_JP.cpp index 596b717d1..344e6e3b1 100644 --- a/plugins/builtin/source/lang/ja_JP.cpp +++ b/plugins/builtin/source/lang/ja_JP.cpp @@ -787,6 +787,7 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.general.show_tips", "起動時に豆知識を表示" }, { "hex.builtin.setting.general.auto_load_patterns", "対応するパターンを自動で読み込む" }, { "hex.builtin.setting.general.sync_pattern_source", "プロバイダ間のパターンソースコードを同期" }, + // { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" }, { "hex.builtin.setting.interface", "UI" }, { "hex.builtin.setting.interface.color", "カラーテーマ" }, { "hex.builtin.setting.interface.color.system", "システム設定に従う" }, diff --git a/plugins/builtin/source/lang/ko_KR.cpp b/plugins/builtin/source/lang/ko_KR.cpp index a2fb2d2e0..d3105678b 100644 --- a/plugins/builtin/source/lang/ko_KR.cpp +++ b/plugins/builtin/source/lang/ko_KR.cpp @@ -784,6 +784,7 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.general.show_tips", "시작 시 팁 표시" }, { "hex.builtin.setting.general.auto_load_patterns", "지원하는 패턴 자동으로 로드" }, { "hex.builtin.setting.general.sync_pattern_source", "공급자 간 패턴 소스 코드 동기화" }, + // { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" }, { "hex.builtin.setting.interface", "인터페이스" }, { "hex.builtin.setting.interface.color", "색상 테마" }, { "hex.builtin.setting.interface.color.system", "시스템" }, diff --git a/plugins/builtin/source/lang/pt_BR.cpp b/plugins/builtin/source/lang/pt_BR.cpp index 4e6559d36..cb239dfbf 100644 --- a/plugins/builtin/source/lang/pt_BR.cpp +++ b/plugins/builtin/source/lang/pt_BR.cpp @@ -783,6 +783,7 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.general.show_tips", "Mostrar dicas na inicialização" }, { "hex.builtin.setting.general.auto_load_patterns", "Padrão compatível com carregamento automático" }, // { "hex.builtin.setting.general.sync_pattern_source", "Sync pattern source code between providers" }, + // { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" }, { "hex.builtin.setting.interface", "Interface" }, { "hex.builtin.setting.interface.color", "Color theme" }, { "hex.builtin.setting.interface.color.system", "Sistema" }, diff --git a/plugins/builtin/source/lang/zh_CN.cpp b/plugins/builtin/source/lang/zh_CN.cpp index 4ebfb3a77..e8d60c896 100644 --- a/plugins/builtin/source/lang/zh_CN.cpp +++ b/plugins/builtin/source/lang/zh_CN.cpp @@ -785,6 +785,7 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.general.show_tips", "在启动时显示每日提示" }, { "hex.builtin.setting.general.auto_load_patterns", "自动加载支持的模式" }, { "hex.builtin.setting.general.sync_pattern_source", "在提供器间同步模式源码" }, + // { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" }, { "hex.builtin.setting.interface", "界面" }, { "hex.builtin.setting.interface.color", "颜色主题" }, { "hex.builtin.setting.interface.color.system", "跟随系统" }, diff --git a/plugins/builtin/source/lang/zh_TW.cpp b/plugins/builtin/source/lang/zh_TW.cpp index 1b017eadf..543f17688 100644 --- a/plugins/builtin/source/lang/zh_TW.cpp +++ b/plugins/builtin/source/lang/zh_TW.cpp @@ -783,6 +783,7 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.general.show_tips", "啟動時顯示提示" }, { "hex.builtin.setting.general.auto_load_patterns", "自動載入支援的模式" }, // { "hex.builtin.setting.general.sync_pattern_source", "Sync pattern source code between providers" }, + // { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" }, { "hex.builtin.setting.interface", "介面" }, { "hex.builtin.setting.interface.color", "顏色主題" }, { "hex.builtin.setting.interface.color.system", "系統" },