Use textDirection() for glyph layout


QCanvasPainter::textDirection() was previously only used for text
alignment, but it also needs to be passed to QTextLayout so that
bidirectional text is laid out correctly.

Pick-to: 6.11
Change-Id: I566603fa01780712e5b329ce6d2cb3b2e78127d4
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
commit5a69f1c4d59f38f437c40bdd81efbc5fcf6d9962
parent8e54d99d72a47387e517279e851a9b4c93d5ed2c
authorPaul Olav Tvete <paul.tvete@qt.io>
committerPaul Olav Tvete <paul.tvete@qt.io>
commit timeFri, 24 Apr 2026 10:41:06 +0000