def test_text_direction_rtl2(self):
    ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
    im = Image.new(mode='RGB', size=(300, 100))
    draw = ImageDraw.Draw(im)
    draw.text((0, 0), 'Oman سلطنة عمان', font=ttf, fill=500, direction='rtl')
    target = 'Tests/images/test_direction_ltr.png'
    target_img = Image.open(target)
    self.assert_image_similar(im, target_img, 0.5)
def test_text_direction_rtl2(self):
    ttf = ImageFont.truetype(FONT_PATH, FONT_SIZE)
    im = Image.new(mode='RGB', size=(300, 100))
    draw = ImageDraw.Draw(im)
    draw.text((0, 0), 'Oman سلطنة عمان', font=ttf, fill=500, direction='rtl')
    target = 'Tests/images/test_direction_ltr.png'
    target_img = Image.open(target)
    self.assert_image_similar(im, target_img, 0.5)