PHP imagettftext not working with freetype support

458 Views Asked by At

My code with function imagettftext doesn't work on linux,however works well on my windows.

imagettftext($thumb, 10, 0, 130, 60, $textcolor, "./arial.ttf", "123");

I've installed gd lib, freetype,and font

gd_info() output:

array(12) {
  ["GD Version"]=>
  string(13) "2.0 or higher"
  ["FreeType Support"]=>
  bool(true)
  ["FreeType Linkage"]=>
  string(13) "with freetype"
  ["T1Lib Support"]=>
  bool(true)
  ["GIF Read Support"]=>
  bool(true)
  ["GIF Create Support"]=>
  bool(true)
  ["JPG Support"]=>
  bool(true)
  ["PNG Support"]=>
  bool(true)
  ["WBMP Support"]=>
  bool(true)
  ["XPM Support"]=>
  bool(false)
  ["XBM Support"]=>
  bool(false)
  ["JIS-mapped Japanese Font Support"]=>
  bool(false)
}

Function Result :

array (
  0 => -53534192,
  1 => 32627,
  2 => -53534184,
  3 => 32627,
  4 => -53534176,
  5 => 32627,
  6 => -1169942752,
  7 => 32767,
)
1

There are 1 best solutions below

1
On

freetype version is not compatible with my Centos version