Fix handling of glyphs for ligatures in fonts


This fixes three individual shortcomings:

- The old code expected a glyph's unicode attribute to have exactly one
character, but multiple characters are allowed and even required to
handle ligatures properly. It reduced a ligature's unicode attribute to
its first character which resulted in drawing the ligature for each
appearance of that single character.

- Due to the above, different glyphs whose unicode attribute started
with the same character could overwrite each other.

- Glyphs were stored in a QHash, so the order in which they were defined
in the .svg file got lost. This violated the standard which mandates
that the first glyph with a matching unicode attribute shall be used for
drawing that unicode text.

This is tested by existing baseline tests fonts-glyph-201-t.svg and
fonts-glyph-202-t.svg

Fixes: QTBUG-130140
Fixes: QTBUG-137773
Pick-to: 6.10
Change-Id: Ifd9ec127c8737dbde5a62c3b864b04a9ced8c52a
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
commit7a58783f3e004e3af619b143667e2d9130b33277
parent976d0dab2118af8c6fcd16cf89a8c4821565b204
authorRobert Löhning <robert.loehning@qt.io>
committerRobert Löhning <robert.loehning@qt.io>
commit timeTue, 2 Dec 2025 07:46:04 +0000