php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #61480
Patch bug48555 revision 2012-04-03 22:20 UTC by mattficken@php.net
revision 2012-03-22 21:07 UTC by mattficken@php.net

Patch bug48555 for Testing related Bug #61480

Patch version 2012-03-22 21:07 UTC

Return to Bug #61480 | Download this patch
Patch Revisions:

Developer: mattficken@php.net

--- C:/Users/v-mafick.REDMOND/Downloads/php-5.3-src-r324324/php-5.3-src-r324324/ext/gd/tests/bug48555.phpt	Tue Jul 28 12:16:02 2009
+++ C:/php-sdk/php-5.3-src-r324324/ext/gd/tests/bug48555.phpt	Wed Mar 21 13:03:05 2012
@@ -4,9 +4,20 @@
 <?php
 	if(!extension_loaded('gd')){ die('skip gd extension not available'); }
 	if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+	
+	ob_start();
+	phpinfo(INFO_MODULES);
+	$info = ob_get_clean();
+	
+	preg_match("/FreeType Version => (\d+).(\d+).(\d+)/", $info, $m);
+		
+	if (!($m[1]>=2 && ($m[2]>4||($m[2]==4&&$m[3]>=3)))) {
+		die('skip freetype version is too old. test requires FreeType 2.4.3 or higher');
+	}
+		
 ?>
 --FILE--
-<?php
+<?php		
 $cwd = dirname(__FILE__);
 $font = "$cwd/Tuffy.ttf";
 $box = ImageFTBBox(14, 0, $font, "Text without line-break");
@@ -15,5 +26,5 @@
 echo 'Top with line-break: ' . $box[7] . "\n";
 ?>
 --EXPECTF--
-Top without line-break: -14
-Top with line-break: -14
+Top without line-break: -15
+Top with line-break: -15
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 05:01:30 2024 UTC