bugThe FreeType Project - Bugs: bug #35466, Wrong outline for TT font

 
 

bug #35466: Wrong outline for TT font

Submitted by:  John Tytgat <joty>
Submitted on:  Tue 07 Feb 2012 03:34:19 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.4.9

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 11 Feb 2012 08:31:45 PM UTC, comment #1:

The font is buggy. It contains a jump instruction with a strange offset. FreeType's handling was not really wrong (the OpenType specification doesn't describe any restrictions for jump instructions), but it deviated from MS bytecode engine.

The new behaviour disallows jumps beyond the bounds of FDEFs. However, this doesn't make the rendering better in general – FreeType's byte engine aborts if it encounters an error, thus the glyph remains with unfinished hinting. For this particular font it accidentally looks better for me.

A solution to avoid half-hinted glyphs in buggy fonts is to set the FT_LOAD_PEDANTIC flag so that bytecode engine errors are passed to the application. In case of an error it could try to render the glyph without hinting. Perhaps MacOS and Acrobat are doing something similar.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 07 Feb 2012 03:34:19 PM UTC, original submission:

Attached a PDF file and a subsetted TrueType font (used in that PDF file) which gives significantly wrong outlines for its glyphs (e.g. see 'a' and 'd' glyph but others are also wrongly rendered). This is not a hinting problem as far as I can see.

Reproduced in today's FT + 'ftview' program.

The TrueType font displays correctly on MacOS's preview pane as well in Acrobat (using the PDF file).

Not sure if this is a slightly dodgy font (as its 'head' table is 56 bytes while only 54 bytes are expected).

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 #25000:  one_line.pdf added by joty (714KiB - application/unknown)
file #25001:  one_line_font.ttf added by joty (5KiB - application/octet-stream)

 

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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 11 Feb 2012 08:31:45 PM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.4.9
    Tue 07 Feb 2012 03:34:19 PM UTCjotyAttached File-=>Added one_line.pdf, #25000
      Attached File-=>Added one_line_font.ttf, #25001

    Back to the top


    Powered by Savane 3.1-cleanup1