facebook / facebook/hhvm

imagettftext warns "Expecting dom objects in parameters"

Đang mở
#2,958 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
php5 incompatibility
Ngôn ngữ chính
C++
Star
18.7k
Fork
3.1k
Merge trung bình
1 giờ 47 phút
Pull request đã merge (30 ngày)
2

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.