core: add QS_DROP_EXPENSIVE_FONTS env var

This commit is contained in:
outfoxxed committed 2026-04-08 01:35:15 -07:00
1 parent f0d0216b3d
commit 7208f68bb7
2 files changed
+12 -10

No files matched your search

+11 -9
View File
@@ -169,6 +169,17 @@ int launch(const LaunchArgs& args, char** argv, QCoreApplication* coreApplicatio
Common::INITIAL_ENVIRONMENT = QProcessEnvironment::systemEnvironment();
if (!pragmas.useSystemStyle) {
qunsetenv("QT_STYLE_OVERRIDE");
qputenv("QT_QUICK_CONTROLS_STYLE", "Fusion");
}
for (auto [var, val]: pragmas.envOverrides.asKeyValueRange()) {
qputenv(var.toUtf8(), val.toUtf8());
}
pragmas.dropExpensiveFonts |= qEnvironmentVariableIntValue("QS_DROP_EXPENSIVE_FONTS") == 1;
if (pragmas.dropExpensiveFonts) {
if (auto* runDir = QsPaths::instance()->instanceRunDir()) {
auto baseConfigPath = qEnvironmentVariable("FONTCONFIG_FILE");
@@ -209,15 +220,6 @@ int launch(const LaunchArgs& args, char** argv, QCoreApplication* coreApplicatio
}
}
if (!pragmas.useSystemStyle) {
qunsetenv("QT_STYLE_OVERRIDE");
qputenv("QT_QUICK_CONTROLS_STYLE", "Fusion");
}
for (auto [var, val]: pragmas.envOverrides.asKeyValueRange()) {
qputenv(var.toUtf8(), val.toUtf8());
}
// The qml engine currently refuses to cache non file (qsintercept) paths.
// if (auto* cacheDir = QsPaths::instance()->cacheDir()) {