aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickpath.cpp
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2025-09-04 14:26:38 +0200
committerEirik Aavitsland <eirik.aavitsland@qt.io>2025-09-05 18:38:17 +0200
commit815cd44fbb6497a0551a24578ad9a63bfce8531a (patch)
tree87c88ec5e0d633a4ca789a772710e578e53f0025 /src/quick/util/qquickpath.cpp
parentfbd10cac80ffa1d59b58f553926d39e3c89aaa48 (diff)
Doc: Add some notes about PathText usage in Quick Shapes
Note the expected fill rule, as defined by TrueType, and explain that if the stroked outline looks bad, it's the font's fault. Pick-to: 6.10 Change-Id: I8c4c7d319c96d2514c3b11f27a7e85b7c408a79d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Diffstat (limited to 'src/quick/util/qquickpath.cpp')
-rw-r--r--src/quick/util/qquickpath.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quick/util/qquickpath.cpp b/src/quick/util/qquickpath.cpp
index bc7b6eeb7b..8843dc9f39 100644
--- a/src/quick/util/qquickpath.cpp
+++ b/src/quick/util/qquickpath.cpp
@@ -3113,6 +3113,13 @@ void QQuickPathMultiline::addToPath(QPainterPath &path, const QQuickPathData &)
baseline will be translated to the x and y coordinates, and the outlines from the font
will be added to the path accordingly.
+ When used to render texts in a Shape item, note the following:
+ \list
+ \li For correct fill, the ShapePath's fillRule should be set to ShapePath.WindingFill.
+ \li Not all fonts provide a nice outline suitable for stroking. If you want a stroked
+ outline and are getting unsatisfactory results, try a different font.
+ \endlist
+
\qml
PathText {
x: 0