From:             
Operating system: Linux delphinus 2.6.32.8
PHP version:      5.2.14
Package:          GD related
Bug Type:         Bug
Bug description:bounding box coordinates are wrong

Description:
------------
The metrics returned by this function are inaccurate - I put together a
comprehensive test script that demonstrates the problem:



http://fontjazz.com/metrics/test.php



This is also reproducible on my workstation with PHP 5.3.1 on Windows Vista
SP1 (build 6001).



This bug has been present in Windows builds of PHP 5 for at least a year,
and was introduced in Linux builds more recently - my font embedding system
(fontjazz.com) is currently generating broken fonts due to this bug.



I've reported this bug before, and if I recall, others reported it before I
did - relating this problem to notes/revisions from previous attempts to
address this problem might be useful, but I can't seem to find the old bug
in the database anymore.



I don't recall if this bug was blamed on PHP, GD or FreeType - I think
there were different theories at the time, but it looks like there was no
resolution.

Test script:
---------------
The source code for the test script is displayed on this page:



http://fontjazz.com/metrics/test.php



You will need a font for testing - I recommend "georgiai.ttf", the OpenType
version, which can be found on Windows Vista installations under
WINDOWS\Fonts.



If you don't have this font, try another OpenType font in italics - this
problem seems to affect italic fonts the worst, probably because italic
typefaces generally have more glyph overlap.



With some non-italic fonts, unless rendered at really large sizes, the
problem may not be obvious enough to spot with the eye, but there is always
some degree of inaccuracy, with any font, when rendered at a sufficiently
large size.



Expected result:
----------------
The red outline should accurately surround the rendered text.

Actual result:
--------------
The red outline is somewhat offset.

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52756&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52756&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52756&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52756&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52756&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52756&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52756&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52756&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52756&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52756&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52756&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52756&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52756&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52756&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52756&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52756&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52756&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52756&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52756&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52756&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52756&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52756&r=mysqlcfg

Reply via email to