1
0
mirror of synced 2025-02-17 18:59:21 +01:00

fix: Enable unicode support on the web again

This commit is contained in:
WerWolv 2023-10-06 15:33:55 +02:00
parent 6cf3bfb89f
commit a07b678a61

View File

@ -328,16 +328,12 @@ namespace hex::init {
}
bool loadFonts() {
// Check if unicode support is enabled in the settings
// 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."
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);
}