Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8.2, 6.9.0 Beta2
-
Windows 10 22H2
-
bc89f85a3 (dev), b5bef69c5 (6.9), 914f75fe1 (6.8)
Description
In the attached example, the SVG image's size is nominally 25x10 but it is displayed at 250x100.
Code
text.svg
<svg viewBox="0 0 25 10" xmlns="http://www.w3.org/2000/svg"> <text x="5" y="5" font-size="2" font-family="Arial">Some test text!</text> </svg>
Main.qml
import QtQuick import QtQuick.VectorImage Window { id: root width: 400 height: 300 visible: true property real svgWidth: 250 property real svgHeight: 100 Column { Text { text: "Image:" } Image { source: "text.svg" sourceSize.width: root.svgWidth sourceSize.height: root.svgHeight width: root.svgWidth height: root.svgHeight } Text { text: "VectorImage:" } VectorImage { source: "text.svg" width: root.svgWidth height: root.svgHeight } } }
Outcomes
Image renders the SVG just fine, but VectorImage has terrible kerning:
Attachments
For Gerrit Dashboard: QTBUG-133852 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
626833,4 | vectorimage: Use unhinted font layouts | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
627712,2 | vectorimage: Use unhinted font layouts | 6.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
627893,2 | vectorimage: Use unhinted font layouts | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |