xref: /PHP-5.3/ext/gd/tests/bug48801.phpt (revision 131d7d7a)
1--TEST--
2Bug #48801 (Problem with imagettfbbox) freetype < 2.4.10
3--SKIPIF--
4<?php
5	if(!extension_loaded('gd')){ die('skip gd extension not available'); }
6	if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
7
8	include dirname(__FILE__) . '/func.inc';
9	if(version_compare(get_freetype_version(), '2.4.10') >= 0) die('skip for freetype < 2.4.10');
10?>
11--FILE--
12<?php
13$cwd = dirname(__FILE__);
14$font = "$cwd/Tuffy.ttf";
15$bbox = imageftbbox(50, 0, $font, "image");
16echo '(' . $bbox[0] . ', ' . $bbox[1] . ")\n";
17echo '(' . $bbox[2] . ', ' . $bbox[3] . ")\n";
18echo '(' . $bbox[4] . ', ' . $bbox[5] . ")\n";
19echo '(' . $bbox[6] . ', ' . $bbox[7] . ")\n";
20?>
21--EXPECTF--
22(-1, 15)
23(155, 15)
24(155, -48)
25(-1, -48)
26