def test_rtl_forced_direction(assert_pixels):
    assert_pixels('''
        __________BBBBB
        __________BBBBB
        __________BBBBB
        __________BBBBB
        _____BBBBBBBBBB
    ''', '''
      <style>
        @page { size: 15px 5px }
        body { font-family: weasyprint; color: blue; font-size: 5px; line-height: 1 }
      </style>
      <div style="direction: rtl">اب</div>
    ''')
,
tests/draw/test_text.py