Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.7.0
-
None
Description
The attached screenshot is produced by the folllowing code:
Column { Rectangle { width: 200; height: 100 border.width: 1 Text { text: "Hello"; font.pixelSize: 80 anchors.centerIn: parent } } Rectangle { width: 200; height: 100 border.width: 1 Text { text: "Hello"; font.pixelSize: 40 anchors.centerIn: parent font.letterSpacing: 20 } } }
Both text objects are positioned using anchors.centerIn. The bottom object has font.letterSpacing specified, and because of the letter spacing applied after the last letter, the item is not centered as expected. To center the item, it would have to be explicitly set with an x value that takes the letter spacing into account.