facebook / facebook/hhvm

imagettftext warns "Expecting dom objects in parameters"

Abierto
#2,958 3 comentarios 0 reacciones 0 asignados Ver en GitHub
php5 incompatibility
Lenguaje dominante
C++
Estrellas
18.7k
Forks
3.1k
Merge medio
1 h 47 min
PR fusionados (30 d)
2

Descripción

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)
}
```

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.