summaryrefslogtreecommitdiffstats
path: root/src/runtime/q3dsfontdatabase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/q3dsfontdatabase.cpp')
-rw-r--r--src/runtime/q3dsfontdatabase.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/runtime/q3dsfontdatabase.cpp b/src/runtime/q3dsfontdatabase.cpp
index 384bf68..98f2c91 100644
--- a/src/runtime/q3dsfontdatabase.cpp
+++ b/src/runtime/q3dsfontdatabase.cpp
@@ -30,6 +30,7 @@
#include "q3dsfontdatabase_p.h"
#include <QtCore/qdir.h>
+#include <QtGui/private/qrawfont_p.h>
#if QT_VERSION >= QT_VERSION_CHECK(5,12,2)
@@ -90,8 +91,17 @@ QRawFont Q3DSFontDatabase::findFont(const QString &fontId)
{
for (Font &font : m_fonts) {
if (font.fontId == fontId) {
- if (!font.rawFont.isValid())
+ if (!font.rawFont.isValid()) {
font.rawFont = QRawFont(font.filePath, 16);
+
+#if QT_VERSION < QT_VERSION_CHECK(5,12,3)
+ // Work-around for Q3DS-3132
+ if (font.rawFont.isValid()) {
+ QRawFontPrivate *d = QRawFontPrivate::get(font.rawFont);
+ d->fontEngine->fontDef.stretch = 100;
+ }
+#endif
+ }
return font.rawFont;
}
}