On my Linux based server imagettftext
Here is my code,
It is showing me as some ascii characters.
//ImageTTFText($image, $size, 0, $x, $y, $text_color, '/path/to/font.ttf', 'THIS TEXT WILL BE SHOWN');
// Set the content-type
// Create the image
$im = imagecreatetruecolor(400, 30);
// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
// The text to draw
$text = 'Testing';
// Replace path by your own font path
$font = 'customfonts/FrangipaniRose.ttf';
// Add some shadow to the text
//imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
// Add the text
imagettftext($im, 20, 0, 10, 20, $white, $font, $text);
// Using imagepng() results in clearer text compared with imagejpeg()
i have uploaded font using Web Base FTP tool.
I went though different forums and according to that also try to upload font as binary file but on my server do not have facility to upload as binary file.
I am using Parallels Plesk Control Panel.
Also i have checked my GD Support
GD Version = 2.0.34
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
Can anyone please help me in this.