How to generate a picture with the text?

Tell me how to dynamically generate the image on the server side, with the font and its decoration?

Here is an example
June 10th 19 at 15:56
2 answers
June 10th 19 at 15:58
As a variant of the canvas
June 10th 19 at 16:00
imagick or gd.
And, of course, the font is the right

Find more questions by tags HTMLPHP