Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.84k stars 1.5k forks source link

Arabic Or Persian Multi Line Text is reverse #1317

Closed soheylfarzane closed 4 months ago

soheylfarzane commented 5 months ago

when write arabic or persian text in multi line text start from bottom start of sentence is from bottom and the first line is last typed line its reverse

olivervogel commented 5 months ago

I cannot reproduce the issue. I don't know Arabic but as far as I can tell, the following code returns the result below with the correct line order.

Apart from that, it would help me (and others) if you would stick to the communication standards if this project and use the issue templates. In the templates important information are requested that is not provided in your rather puny bug report.

Code

$image = ImageManager::gd()
    ->create(300, 150)
    ->fill('ddd');

$text = <<<TEXT
هذا هو السطر 1
هذا هو السطر 2
TEXT;

$image->text($text, 90, 90, function (FontFactory $font) {
    $font->filename('./noto.ttf'); // Noto Sans Arabic
    $font->size(20);
    $font->lineHeight(3);
});

Result

localhost-2

olivervogel commented 4 months ago

Closing due to inactivity.