xref: /PHP-7.3/ext/gd/tests/bug48801.phpt (revision 726c5999)
1--TEST--
2Bug #48801 (Problem with imagettfbbox)
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--FILE--
9<?php
10$cwd = dirname(__FILE__);
11$font = "$cwd/Tuffy.ttf";
12$bbox = imageftbbox(50, 0, $font, "image");
13echo '(' . $bbox[0] . ', ' . $bbox[1] . ")\n";
14echo '(' . $bbox[2] . ', ' . $bbox[3] . ")\n";
15echo '(' . $bbox[4] . ', ' . $bbox[5] . ")\n";
16echo '(' . $bbox[6] . ', ' . $bbox[7] . ")\n";
17?>
18--EXPECTREGEX--
19\(4, 15\)
20\(16[0-1], 15\)
21\(16[0-1], -4[7-8]\)
22\(4, -4[7-8]\)
23