imagettftext warns "Expecting dom objects in parameters"
- Linguagem predominante
- C++
- Estrelas
- 18.7k
- Forks
- 3.1k
- Merge médio
- 1h 47min
- PRs com merge (30d)
- 2
Descrição
When using `imagettftext()` in HHVM Stable on U 14.04 Trusty without truetype configured the error logs:
`Warning: Expecting dom objects in parameters in #path on line #line`
Using the following code:
``` php
header("Content-type: image/png");
$text = "Text";
$im = imagecreatefrompng("path/to/image.png");
imagealphablending($im, true);
imagesavealpha($im, true);
$color = imagecolorallocate($im, 255, 255, 255);
$p = (imagesx($im) - 7.5 * strlen($text)) / 2;
$font = "path/to/font.ttf";
imagettftext($im, 20, 0, $p-90, 70, $color, $font, $text);
imagepng($im);
imagedestroy($im);
```
gd_info() output:
```
array(11) {
["GD Version"]=>
string(27) "bundled (2.0.34 compatible)"
["FreeType Support"]=>
bool(false)
["T1Lib_Support"]=>
bool(false)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(true)
["JPEG Support"]=>
bool(true)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XPM Support"]=>
bool(false)
["XBM Support"]=>
bool(true)
["JIS-mapped Japanese Font Support"]=>
bool(false)
}
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.