diff options
author | Määttä Antti <antti.maatta@qt.io> | 2018-02-13 12:49:02 +0200 |
---|---|---|
committer | Marianne Yrjänä <marianne.yrjana@qt.io> | 2018-02-13 15:02:20 +0000 |
commit | a3e06ca0966c66cbe46e455b3b7d8598d4ed2fef (patch) | |
tree | 01cfe7f126b50535fa89365e5466622307f57d35 | |
parent | 51a9eb0809861203d3e2d8ecea0d920b86a0c153 (diff) |
Fix Rajdani font rendering
Apparently the Oblique style fonts should not set the type and weight to
font when using Qt font engine.
Task-number: QT3DS-1039
Change-Id: I3ef49ee2fcf70626c49e2b3c27dde010401300bb
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r-- | src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSQtTextRenderer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSQtTextRenderer.cpp b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSQtTextRenderer.cpp index aad51286..3971007b 100644 --- a/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSQtTextRenderer.cpp +++ b/src/Runtime/Source/Qt3DSRuntimeRender/Source/Qt3DSQtTextRenderer.cpp @@ -224,8 +224,10 @@ struct Qt3DSQtTextRenderer : public ITextRenderer // Detect font style and weight using a dummy QRawFont QRawFont rawFont(rawData, 1.0); if (rawFont.isValid()) { - fi.font.setStyle(rawFont.style()); - fi.font.setWeight(rawFont.weight()); + if (rawFont.style() != QFont::StyleOblique) { + fi.font.setStyle(rawFont.style()); + fi.font.setWeight(rawFont.weight()); + } } else { qCWarning(WARNING, "Failed to determine font style: %s", entry.toStdString().c_str()); |