[Interest] Drawing text along an arbitrary path in Qt Quick

Thomas Sevaldrud thomas at silentwings.no
Tue Mar 17 17:57:12 CET 2015


Hi, I am working on a map renderer using OpenGL and Qt. The plan is to
render text labels in the map with signed distance fields, so I have been
looking at QSGDistanceFieldGlyphNode for this purpose.

However, the current QSG text rendering engine only seems to support
rendering text along straight lines, i.e. a QGlyphRun which optionally may
be rotated afterwards.

In my application I need to render each glyph along an arbitrary path (for
example a road). I guess that I have to implement my own version of
QSGDistanceFieldGlyphNode which takes a new structure as input which is
similar to QGlyphRun, but has a rotation for each glyph in addition to the
position.

Am I correct in assuming that arbitrary text paths is generally
unsupported, or is there some existing Qt functionality for this that I
have missed? Does my approach through QSDistanceFieldGlyphNode sound like a
feasible way to go?

Cheers,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150317/97735ccd/attachment.html>


More information about the Interest mailing list