bugThe FreeType Project - Bugs: bug #38443, FT_Load_Glyph() fails for a subset...

 
 

bug #38443: FT_Load_Glyph() fails for a subset TT font while Acrobat shows its glyphs

Submitted by:  John Tytgat <joty>
Submitted on:  Thu 28 Feb 2013 03:12:53 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 01 Mar 2013 12:54:13 PM UTC, comment #4:

Fair enough. I agree with the analysis. Thanks.

John Tytgat <joty>
Thu 28 Feb 2013 06:20:57 PM UTC, comment #3:

Well, a missing subroutine, or rather a wrong function index is usually a very severe problem. Contrary to an error in a single bytecode instruction, it is not possible to provide a (more or less) sane default for a complete subroutine.

There are two choices:

(1) FreeType ignores this problem and produces, say, exploding outlines because of the wrong or missing subroutine.

(2) FreeType aborts, giving the application a chance to try again with other settings, for example, loading the font without hinting.

I definitely prefer (2).

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Thu 28 Feb 2013 05:24:35 PM UTC, comment #2:

When I switch off the "Smooth text" option in Acrobat 10.1.5 (and Acrobat 7.1.0), it's very clear there is no hinting is done.

Just wondering: as FT_LOAD_PEDANTIC is not set, shouldn't buggy hinting data in the font not just be ignored by FT ?

John Tytgat <joty>
Thu 28 Feb 2013 04:07:39 PM UTC, comment #1:

The error is legitimate, because the font contains a call to a function with an invalid index within the `prep' table. Consequently, the bytecode fails for all glyphs in this broken font.

To be more precise: `FT_Load_Glyph' fails if you ask for TrueType hinting. The font loads just fine otherwise. In particular, it works with autohinting. I can imagine that a PDF viewer tries to reload the glyph with either no hinting or with autohinting in case of error: If the loading of, say, 20 glyphs fails, a PDF viewer could even completely switch to autohinting for this particular font.

Since failing calls to subroutines is a really severe error, I think it's best to not change FreeType's behaviour.

BTW, do you see hinting with Acrobat?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Thu 28 Feb 2013 03:12:53 PM UTC, original submission:

I've a PDF file (assumed to be created with TCPDF 5.9.201) containing a subset TT font for which FreeType's FT_Load_Glyph() fails for all its glyphs. As far as I can see TT_RunIns() always return with an error. I can't judge what that error is about and/or whether it is legitimate.

The PDF file itself shows fine in Acrobat (using Acrobat 10.1.5).

Is FreeType too sensitive for an issue with this TT subset font ? Or is it a problem in FreeType itself ? Or is Acrobat too forgiving ?

PDF & extracted TT font attached.

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 #27545:  jo_sm01.pdf added by joty (100KiB - application/unknown)
file #27546:  jo_sm01_DejaVuSans_bold.ttf added by joty (80KiB - 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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 28 Feb 2013 04:07:39 PM UTCwlStatusNone=>Invalid
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
    Thu 28 Feb 2013 03:12:53 PM UTCjotyAttached File-=>Added jo_sm01.pdf, #27545
      Attached File-=>Added jo_sm01_DejaVuSans_bold.ttf, #27546

    Back to the top


    Powered by Savane 3.1-cleanup1