From 4db10f1c8b9f1b8e33dc18fc00d0bb98a52e6a60 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 6 Oct 2023 11:11:04 +0200 Subject: [PATCH] fix: Disable unicode support on the web version --- main/gui/source/init/tasks.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main/gui/source/init/tasks.cpp b/main/gui/source/init/tasks.cpp index 93bde1a1e..2d860eb96 100644 --- a/main/gui/source/init/tasks.cpp +++ b/main/gui/source/init/tasks.cpp @@ -328,12 +328,16 @@ namespace hex::init { } bool loadFonts() { - // Check if unicode support is enabled in the settings and that the user doesn't use the No GPU version on Windows - // The Mesa3D software renderer on Windows identifies itself as "VMware, Inc." + // Check if unicode support is enabled in the settings bool shouldLoadUnicode = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.load_all_unicode_chars", false) && ImHexApi::System::getGPUVendor() != "VMware, Inc."; + // Force disable unicode support when using the mesa software renderer or any of the web renderers + const auto gpuVendor = ImHexApi::System::getGPUVendor(); + if (gpuVendor == "VMware, Inc." || gpuVendor == "WebKit" || gpuVendor == "Mozilla") + shouldLoadUnicode = false; + return loadFontsImpl(shouldLoadUnicode); }