php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #629 More rounding problems when hinting off (e.g. rendering text at 0.0001 degrees)
Submitted: 1998-08-07 11:22 UTC Modified: 1998-08-08 18:33 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-07 11:22 UTC] ellson at lucent dot com
*** gdttf.c.orig        Fri Aug  7 11:09:31 1998
--- gdttf.c     Fri Aug  7 11:09:56 1998
***************
*** 36,38 ****
  
! /* display resolution - (Not really.  This has to be 72 or hinting is wrong */ 
  #define RESOLUTION 72
--- 36,38 ----
  
! /* display resolution - (Not really.  This has to be 72 or hinting is wrong) */ 
  #define RESOLUTION 72
***************
*** 43,45 ****
  /* Line separation as a factor of font height.  
!       No space between if LINESPACE = 1.00 */
  #define LINESPACE 1.05
--- 43,46 ----
  /* Line separation as a factor of font height.  
!       No space between if LINESPACE = 1.00 
!       Line separation will be rounded up to next pixel row*/
  #define LINESPACE 1.05
***************
*** 340,351 ****
  
- #if 0
-       /* Set flag if font is rotated */
-       if (a->angle == 0) {
-               TT_Set_Instance_Transform_Flags(a->instance, FALSE, FALSE);
-       }
-       else {
-               TT_Set_Instance_Transform_Flags(a->instance, TRUE, FALSE);
-       }
- #endif
- 
        TT_Get_Instance_Metrics(a->instance, &a->imetrics);
--- 341,342 ----
***************
*** 630,636 ****
        glyphkey.character = ch;
- #if 0
-       glyphkey.hinting = (fg<0)?0:1;
- #else
        glyphkey.hinting = 1;
- #endif
      glyphkey.font = font;
--- 621,623 ----
***************
*** 654,657 ****
        /* copy to gif, mapping colors */
!       x2 = x + (glyph->xmin + ((x1+32) & -64)) / 64;
!       y2 = y - (glyph->ymin + ((y1+32) & -64)) / 64;
        tweencolorkey.fgcolor = fg;
--- 641,644 ----
        /* copy to gif, mapping colors */
!       x2 = x + (((glyph->xmin+32) & -64) + ((x1+32) & -64)) / 64;
!       y2 = y - (((glyph->ymin+32) & -64) + ((y1+32) & -64)) / 64;
        tweencolorkey.fgcolor = fg;
***************
*** 748,750 ****
                if (ch == '\n') {
!                       advance_y -= (TT_F26Dot6)((font->imetrics.y_ppem * LINESPACE) * 64);
                        next++;
--- 735,738 ----
                if (ch == '\n') {
!                       advance_y -= (TT_F26Dot6)(font->imetrics.y_ppem * LINESPACE * 64);
!                       advance_y = (advance_y-32) & -64; /* round to next pixel row */
                        next++;

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-08-08 18:33 UTC] rasmus
Applied
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 05:01:34 2025 UTC