Default-initialize FONTCONFIG_PATH if not set
Fixes font loading in some environments
This commit is contained in:
parent
6564932b64
commit
b709ab887f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue