bugThe FreeType Project - Bugs: bug #23683, Empty contours (one point...

 
 

bug #23683: Empty contours (one point contours) should be discarded

Submitted by:  John Tytgat <joty>
Submitted on:  Mon 23 Jun 2008 01:52:06 PM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.3.7

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 24 Jun 2008 05:44:02 AM UTC, comment #1:

Applied (slightly modified), thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 23 Jun 2008 01:52:06 PM UTC, original submission:

Attached a Type 1 font where several glyphs have a charstring which ends with (e.g. use glyphname AC101):

x y rmoveto (with x y some values)
0 0 rlineto
closepath

In t1_builder_close_contour called for the 'closepath' we have two points whom the last one will be removed as it is the same one as the start point and not being a control point. This leaves us with one point for that contour.

This one point contour situation gets detected at FT_Outline_Check() as being an empty contour and the complete glyph outline gets ignored despite that glyph having other valid contours.

I think this is a little bit too harsh and would like to suggest attached patch for t1_builder_close_contour to remove empty contours.

The patch is made based on FT2.3.6 release and tested with the ftview application.

Thanks,
John.

John Tytgat <joty>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #15912:  aw-helvetica.pfb added by joty (9KiB - application/octet-stream - Type 1 font having several characters which are not recognized by FT2.3.6.)
file #15913:  remove-empty-contour-patch.p added by joty (753B - text/plain - Type 1 font having several characters which are not recognized by FT2.3.6.)
file #15914:  ftview_before_patch.png added by joty (17KiB - image/png - Type 1 font having several characters which are not recognized by FT2.3.6.)
file #15915:  ftview_after_patch.png added by joty (17KiB - image/png - Type 1 font having several characters which are not recognized by FT2.3.6.)

 

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 joty (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
    Tue 24 Jun 2008 05:44:02 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.3.7
    Mon 23 Jun 2008 01:52:06 PM UTCjotyAttached File-=>Added aw-helvetica.pfb, #15912
      Attached File-=>Added remove-empty-contour-patch.p, #15913
      Attached File-=>Added ftview_before_patch.png, #15914
      Attached File-=>Added ftview_after_patch.png, #15915

    Back to the top


    Powered by Savane 3.1-cleanup1