xref: /PHP-8.0/ext/gd/tests/bug48801.phpt (revision c5401854)
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 = __DIR__;
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