From 815cd44fbb6497a0551a24578ad9a63bfce8531a Mon Sep 17 00:00:00 2001 From: Eirik Aavitsland Date: Thu, 4 Sep 2025 14:26:38 +0200 Subject: 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 --- src/quick/util/qquickpath.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/quick/util/qquickpath.cpp') 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 -- cgit v1.2.3