Gosub writing modes & direction test

direction / dir, bidirectional text, and writing-mode (vertical text) with text-orientation. Arabic/Hebrew samples test RTL shaping.

direction & dir attribute

LTR: The quick brown fox. 123 — punctuation, at the end.
direction: ltr
RTL: The quick brown fox. 123 — punctuation, at the end.
direction: rtl (English text, RTL flow — note alignment & punctuation)
مرحبا بالعالم! هذا نص عربي للاختبار 123.
dir="rtl" with Arabic
שלום עולם! זהו טקסט עברי לבדיקה 123.
dir="rtl" with Hebrew

Bidirectional (mixed LTR + RTL)

English text containing arabic مرحبا بالعالم inline, then back to English and a number 42.
mixed scripts in one line
bidi-override: forces this whole line one direction.
unicode-bidi: bidi-override

writing-mode

horizontal-tb: normal top-to-bottom, left-to-right lines that wrap as usual.
horizontal-tb (default)
vertical-rl: lines stack right to left, characters run top to bottom.
vertical-rl
vertical-lr: lines stack left to right, characters run top to bottom.
vertical-lr
upright: 縦書き glyphs stay upright.
text-orientation: upright
sideways: rotated 90°.
text-orientation: sideways

Vertical use-cases

SIDEBAR LABEL
vertical tab / sidebar label
Year 2026 release
numbers within vertical text

RTL table

الاسمالعمر
أحمد30
ليلى25

Column order should mirror to right-to-left under dir="rtl".