Default-initialize FONTCONFIG_PATH if not set

Fixes font loading in some environments
This commit is contained in:
Martchus 2022-05-01 22:35:24 +02:00
parent 6564932b64
commit b709ab887f
1 changed files with 5 additions and 0 deletions

View File

@ -313,6 +313,11 @@ bool hasCoreApp()
*/
void setupCommonQtApplicationAttributes()
{
#ifdef QT_FEATURE_fontdialog
if (!qEnvironmentVariableIsSet("FONTCONFIG_PATH") && QDir(QStringLiteral("/etc/fonts")).exists()) {
qputenv("FONTCONFIG_PATH", "/etc/fonts");
}
#endif
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
if (!QCoreApplication::instance()) {
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);