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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ellson at lucent dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-06 21:56 UTC] rasmus
Patch applied - thanks
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 06:01:32 2025 UTC