php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #625 imagettftext - some characters in wrong vertical pos when not hinting
Submitted: 1998-08-06 20:10 UTC Modified: 1998-08-06 21:56 UTC
From: ellson at lucent dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.2a OS: all
Private report: No CVE-ID: None
 [1998-08-06 20:10 UTC] ellson at lucent dot com
Reported to me by Osma Ahvenlampi <oa@spray.fi>

Problem is caused by a rounding problem in functions/gdttf.c

Here is the fix:

*** gdttf.c.old Wed May 20 14:46:54 1998
--- gdttf.c     Thu Aug  6 18:08:41 1998
***************
*** 688,695 ****
                return (char *)NULL;
  
        /* render (via cache) a bitmap for the current fractional offset */
!       bitmapkey.xoffset = ((x1+32) & 63) - 32 - (glyph->xmin & -64);
!       bitmapkey.yoffset = ((y1+32) & 63) - 32 - (glyph->ymin & -64);
        bitmapkey.glyph = glyph;
        gdCacheGet(glyph->bitmapCache, &bitmapkey);
  
--- 688,695 ----
                return (char *)NULL;
  
        /* render (via cache) a bitmap for the current fractional offset */
!       bitmapkey.xoffset = ((x1+32) & 63) - 32 - ((glyph->xmin+32) & -64);
!       bitmapkey.yoffset = ((y1+32) & 63) - 32 - ((glyph->ymin+32) & -64);
        bitmapkey.glyph = glyph;
        gdCacheGet(glyph->bitmapCache, &bitmapkey);
  

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-06 21:56 UTC] rasmus
Patch applied - thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 23:01:28 2024 UTC