facebook / facebook/hhvm

imagettftext warns "Expecting dom objects in parameters"

オープン
#2,958 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
php5 incompatibility
主要言語
C++
スター
18.7k
フォーク
3.1k
平均マージ
1時間 47分
マージ済み PR(30日)
2

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。