Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.3.2, 5.4.0
-
None
-
Linux Fedora 20, (on Windows not observable)
Description
When text in Qml Text is changed during normal program run (after all Component.onCompletes) and some specific properties are provided – completely wrong font rendering happens. (see image I enclosed as attachment)
- Place DejaVuSansMono.ttf from http://dejavu-fonts.org/wiki/Main_Page next to qtbug44279.qml (or move QML file into dejavu-fonts-ttf-2.34/ttf and run from there)
To reproduce bug two Qml Text elements are at least needed. Moreover these Text items must have all three specific properties filled:
- renderType = Text.NativeRendering
- font.pixelSize
- font.family
As for 2. (pixelSize) my investigation confirmed that pixelSize must be at same value in at least two Texts in order to observe bug and additionally must have value below 10
As for 3. (family) for now I managed to reproduce bug only on DejaVuSans font familly (I tested a few of them: you can get it e.g. from: http://dejavu-fonts.org/wiki/Main_Page)
I have also observed that setting antialiasing to false in any of these two Texts preserves from bug occur too.
I discovered that issue in fairly big Qml project but I managed to make minimal example (.ttf font file next to .qml file needed):
import QtQuick 2.4 import QtQuick.Controls 1.2 Rectangle { width: 100 height: 100 color: "lightgrey" FontLoader { id: fontLoader source: "DejaVuSansMono.ttf" } Column { anchors.top: parent.top anchors.horizontalCenter: parent.horizontalCenter Button { text: "Show BUG!" onClicked: text2.text = "This is a bug!" } Text { id: text1 renderType: Text.NativeRendering font.pixelSize: 10 font.family: fontLoader.name text: "text" } Text { id: text2 renderType: Text.NativeRendering font.pixelSize: 10 font.family: fontLoader.name text: "!" } } }
Attachments
Issue Links
- relates to
-
QTBUG-44273 [REG] Text rendering is completely misplaced for TextInput and Text on screen when not using fontconfig
- Closed