diff --git a/src/gui/main.cpp b/src/gui/main.cpp index f4cac4b9cc..f35c4ef867 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -14,6 +14,7 @@ */ #include +#include #include #ifdef Q_OS_UNIX @@ -34,6 +35,7 @@ #include #include #include +#include using namespace OCC; @@ -99,6 +101,15 @@ int main(int argc, char **argv) return 0; } +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering); +#else + // See https://bugreports.qt.io/browse/QTBUG-70481 + if (std::fmod(app.devicePixelRatio(), 1) == 0) { + QQuickWindow::setTextRenderType(QQuickWindow::NativeTextRendering); + } +#endif + // check a environment variable for core dumps #ifdef Q_OS_UNIX if (!qEnvironmentVariableIsEmpty("OWNCLOUD_CORE_DUMP")) {