xref: /PHP-8.1/ext/gd/tests/bug48801.phpt (revision a375d547)
1--TEST--
2Bug #48801 (Problem with imagettfbbox)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7    if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
8?>
9--FILE--
10<?php
11$cwd = __DIR__;
12$font = "$cwd/Tuffy.ttf";
13$bbox = imageftbbox(50, 0, $font, "image");
14echo '(' . $bbox[0] . ', ' . $bbox[1] . ")\n";
15echo '(' . $bbox[2] . ', ' . $bbox[3] . ")\n";
16echo '(' . $bbox[4] . ', ' . $bbox[5] . ")\n";
17echo '(' . $bbox[6] . ', ' . $bbox[7] . ")\n";
18?>
19--EXPECTREGEX--
20\(4, 15\)
21\(16[0-1], 15\)
22\(16[0-1], -4[7-8]\)
23\(4, -4[7-8]\)
24