Manually merged #6084 to master

This commit is contained in:
anatoly-os 2020-08-20 13:51:39 +03:00
parent 2116e065a5
commit 9cb0a2eb48

View file

@ -394,6 +394,21 @@ void MScore::init()
}
}
}
#endif
// Workaround for QTBUG-73241 (solved in Qt 5.12.2) in Windows 10, see https://musescore.org/en/node/280244
#if defined(Q_OS_WIN) && (QT_VERSION < QT_VERSION_CHECK(5, 12, 2))
if (QOperatingSystemVersion::current().majorVersion() >= 10) {
const QDir additionalFontsDir(QString("%1/Microsoft/Windows/Fonts").arg(QStandardPaths::writableLocation(QStandardPaths::
GenericDataLocation)));
if (additionalFontsDir.exists()) {
QFileInfoList fileList = additionalFontsDir.entryInfoList();
for (int i = 0; i < fileList.size(); ++i) {
QFileInfo fileInfo = fileList.at(i);
QFontDatabase::addApplicationFont(fileInfo.filePath());
}
}
}
#endif
initScoreFonts();
StaffType::initStaffTypes();