bugThe FreeType Project - Bugs: bug #31088, Consider handling fonts with...

 
 

bug #31088: Consider handling fonts with incorrect maxFunctionDefs values

Submitted by:  None
Submitted on:  Mon 20 Sep 2010 06:23:23 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.4.3

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 02 Oct 2010 09:49:16 AM UTC, comment #2:

64 function def slots are now allocated in case maxFunctionDefs is smaller. I think this is the best we can do to support such buggy fonts.

BTW, the `maxFunctionDefs' field has been invented to exactly avoid the need of dynamic allocation. A broken font is a broken font is a broken font...

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 21 Sep 2010 03:40:53 PM UTC, comment #1:

Thanks, I will take a look. BTW, the too small maxFunctionDefs
issue is not found in maxp of original TTF, but PDF generator
writes invalid values to modified maxp in embedded PDF?
If so, I want to know the name of such PDF generator.
In my understanding, there is no significant advantage to rewrite
the values in maxp tables, if without very carefully designed
optimizer of TrueType glyph program. I think the market of
PDF generator is already filled by inexpensive or free-charged
products and cannot afford to encourage the engineers to
invent TrueType optimizer.

suzuki toshiya <mpsuzuki>
Project Administrator
Mon 20 Sep 2010 06:23:23 PM UTC, original submission:

Some PDF files contain embedded fonts which have too small a value for "maxFunctionDefs", sometimes only by 1 or 2. Unfortunately, this leads to a complete inability to use the font since FT_Load_Glyph always returns FT_Err_Too_Many_Function_Defs. It would be nice if this case were handled by dynamically growing the FDefs array -- this appears to be what other font engines do.

I've attached an example of the problematic font.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21509:  HKHXCS+Papyrus.ttf added by None (17KiB - 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 mpsuzuki (Posted a comment)
  •  

    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
    Sat 02 Oct 2010 09:49:16 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.4.3
    Mon 20 Sep 2010 06:23:23 PM UTCNoneAttached File-=>Added HKHXCS+Papyrus.ttf, #21509

    Back to the top


    Powered by Savane 3.1-cleanup1