PHP  
 PHP_5_4
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/gd/tests/bug43073.phpt ('Bug #43073 (TrueType bounding box is wrong for angle<>0) freetype < 2.4.10')

Script

1: <?php
2: $cwd 
dirname(__FILE__);
3:
$font "$cwd/Tuffy.ttf";
4:
$delta_t 360.0 16# Make 16 steps around
5:
$g imagecreate(800800);
6:
$bgnd  imagecolorallocate($g255255255);
7:
$black imagecolorallocate($g000);
8:
$x 100;
9:
$y 0;
10:
$cos_t cos(deg2rad($delta_t));
11:
$sin_t sin(deg2rad($delta_t));
12: for (
$angle 0.0$angle 360.0$angle += $delta_t) {
13:   
$bbox imagettftext($g24$angle400+$x400+$y$black$font'ABCDEF');
14:   
$s vsprintf("(%d, %d), (%d, %d), (%d, %d), (%d, %d)\n"$bbox);
15:   echo 
$s;
16:   
$temp $cos_t $x $sin_t $y;
17:   
$y    $cos_t $y $sin_t $x;
18:   
$x    $temp;
19: }
20:
imagepng($g"$cwd/bug43073.png");
21:
?>
22:

Expected

(500, 402), (610, 402), (610, 376), (500, 376)
(492, 363), (591, 322), (580, 295), (480, 336)
(470, 331), (548, 254), (527, 233), (449, 310)
(439, 309), (483, 202), (461, 193), (416, 299)
(401, 300), (401, 183), (381, 183), (381, 300)
(362, 307), (316, 195), (291, 205), (337, 318)
(330, 329), (246, 244), (224, 265), (308, 350)
(308, 360), (202, 316), (190, 344), (296, 388)
(300, 399), (186, 399), (186, 425), (300, 425)
(306, 437), (195, 483), (206, 510), (318, 464)
(328, 469), (240, 557), (260, 578), (349, 491)
(359, 491), (312, 607), (334, 616), (382, 501)
(398, 500), (398, 618), (418, 618), (418, 500)
(436, 493), (483, 607), (507, 597), (461, 482)
(468, 471), (555, 558), (577, 538), (490, 450)
(490, 440), (600, 485), (611, 457), (502, 412)

Output

(500, 400), (610, 400), (610, 376), (500, 376)
(492, 363), (591, 322), (580, 295), (480, 336)
(470, 331), (548, 254), (527, 233), (449, 310)
(439, 309), (483, 202), (461, 193), (416, 299)
(400, 300), (400, 183), (380, 183), (380, 300)
(362, 307), (316, 195), (291, 205), (337, 318)
(330, 329), (246, 244), (224, 265), (308, 350)
(308, 360), (202, 316), (190, 344), (296, 388)
(300, 400), (187, 400), (187, 425), (300, 425)
(306, 437), (195, 483), (206, 510), (318, 464)
(328, 469), (240, 557), (260, 578), (349, 491)
(359, 491), (312, 607), (334, 616), (382, 501)
(400, 500), (400, 618), (419, 618), (419, 500)
(436, 493), (483, 607), (507, 597), (461, 482)
(468, 471), (555, 558), (577, 538), (490, 450)
(490, 440), (600, 485), (611, 457), (502, 412)

Diff

001+ (500, 400), (610, 400), (610, 376), (500, 376)
001- (500, 402), (610, 402), (610, 376), (500, 376)
005+ (400, 300), (400, 183), (380, 183), (380, 300)
005- (401, 300), (401, 183), (381, 183), (381, 300)
009+ (300, 400), (187, 400), (187, 425), (300, 425)
009- (300, 399), (186, 399), (186, 425), (300, 425)
013+ (400, 500), (400, 618), (419, 618), (419, 500)
013- (398, 500), (398, 618), (418, 618), (418, 500)

 

Generated at Sun, 17 May 2015 16:25:24 +0000 (4 days ago)

Copyright © 2005-2015 The PHP Group
All rights reserved.