bugThe FreeType Project - Bugs: bug #28036, AFM files are not parsed correctly

 
 

bug #28036: AFM files are not parsed correctly

Submitted by:  bram tassyns <bramt>
Submitted on:  Tue 17 Nov 2009 08:31:27 AM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.3.12

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 20 Nov 2009 05:28:16 AM UTC, comment #1:

Applied, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 17 Nov 2009 08:31:27 AM UTC, original submission:

When attaching an AFM file i noticed that the returned kerning values did not match those in the file. I traced the issue to a bug in t1_get_index that caused it to always return 0.

Two unsigned values were substracted and then compared with 0.
On mac substracting two unsigned values results in a new unsigned value (which is always > 0).

t1afm.c,52:

static FT_Int
t1_get_index( const char* name,
FT_Offset len,
void* user_data )
{
T1_Font type1 = (T1_Font)user_data;
FT_Int n;

/* PS string/name length must be < 16-bit */
if ( ( len - 0xFFFFU ) > 0 )
return 0;

=>

static FT_Int
t1_get_index( const char* name,
FT_Offset len,
void* user_data )
{
T1_Font type1 = (T1_Font)user_data;
FT_Int n;

/* PS string/name length must be < 16-bit */
if ( len > 0xFFFF )
return 0;

bram tassyns <bramt>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by bramt (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 20 Nov 2009 05:28:16 AM UTCwlAssigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.3.12
      StatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1