How to write Hindi text property in Image with php

208 Views Asked by At

I am making a tools in php For ,text on image with gp library but when I enter hindi text दिवाली खत्म हो गयी अब सुतली बम क्यों चाहिये??

But it comes like this CHECK IMAGE

My php code

<?php

if(isset($_POST['text'])){
header('content-type:image/jpeg');
$font= __DIR__ . "/Khand-bold.ttf";
 
$image=imagecreatefromjpeg("img.jpg");
$color=imagecolorallocate($image,194,4,6);
$name= "दिवाली खत्म हो गयी अब सुतली बम क्यों चाहिये??";
$size= $_POST['size'];
imagettftext($image,$size,0,50,80,$color,$font,$name);
 
imagejpeg($image);
imagedestroy($image);
}
?>```
0

There are 0 best solutions below