bugThe FreeType Project - Bugs: bug #29846, Invalid setcurrentpoint not...

 
 

bug #29846: Invalid setcurrentpoint not handled as per Adobe implementations

Submitted by:  Kenneth Sharp <kens>
Submitted on:  Mon 10 May 2010 03:33:38 PM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.3.13

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 10 May 2010 10:07:49 PM UTC, comment #1:

Applied, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 10 May 2010 03:33:38 PM UTC, original submission:

This also relates to issue #28226.

Previously we discovered fonts which used 'setcurrentpoint' to set the initial point of a contour to 0,0. This caused FreeType to raise an error, because the setcurrentpoint operator is only supposed to be used with the results from an OtherSubr subroutine.

This was fixed by simply ignoring the error and carrying on.

Now we have found a font which uses setcurrentpoint to actually establish a non-zero point for a contour during the course of a glyph program. FWIW these files may be produced by an application called Intaglio on the Mac, when converting TrueType fonts to type 1.

The attached patch tackles this by :
1) setcurrentpoint uses the top two elements of the stack to establish unconditionally the current x y co-ordinates.
2) The 'flex' subroutine (OtherSubr 0) puts the current x,y co-ordinates onto the stack, instead of two dummy uninitialised values.

This allows the new illegal behaviour, the old illegal behaviour and real proper usage of the operator to work the same way as Adobe interpreters apparently do.

Attached is a unified diff of the patch applied to FreeType, and the original PostScript font (extracted from the PostScript program)

Kenneth Sharp <kens>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20495:  setcurrentpoint.diff added by kens (526B - application/octet-stream)
file #20496:  ecrm10.font.txt added by kens (157KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Updated the item)
  • -unavailable- added by kens (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 10 May 2010 10:07:15 PM UTCwlItem GroupNone=>Incorrect behaviour
      StatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.3.13
      SummaryIllegal setcurrentpoint not handled as per Adobe implementations=>Invalid setcurrentpoint not handled as per Adobe implementations
    Mon 10 May 2010 03:33:38 PM UTCkensAttached File-=>Added setcurrentpoint.diff, #20495
      Attached File-=>Added ecrm10.font.txt, #20496

    Back to the top


    Powered by Savane 3.1-cleanup1