QSvgText: Convert text to glyphs only once


The old code converted the characters of the QSvgText to glyphs from the
used QSvgFont once per drawing operation. Since fill and stroke are
drawn separately, this already meant converting the same text to glyphs
twice. If the same <text> element was referenced by a <use> element or
when calculating bounding rectangles, further repetitions took place.

Instead, the new code does the conversion when needed for the first time
and stores the result in the QSvgText object. As a side effect, also the
conversion from a QList of paragraphs to one QString happens only once
per object.

Fixes: QTBUG-139446
Pick-to: 6.11
Change-Id: I1a53ec0ac9e429a66434319030bca656f0c307c5
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
commita57b90fbd2c2701c680c8c4aa6a187cfd19668f9
parent4f7e67247fc13919c35c2ffac9d4748db74e0ef0
authorRobert Löhning <robert.loehning@qt.io>
committerRobert Löhning <robert.loehning@qt.io>
commit timeWed, 14 Jan 2026 23:15:38 +0000