It's not hard at all, I've got the file "data-latin.ttf" in the same directory, so I can use this command:
imagettftext($image, 10, 0, 168, 27, 0, "data-latin.ttf", $text[0]);
which does almost the same as imagestring(), but it uses a truetype font instead of the normal one.