bugThe FreeType Project - Bugs: bug #44664, PDF viewer: no text displayed if...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #44664: PDF viewer: no text displayed if font embedded and font subsetting enabled

Submitter:  Jun Fang <sanqingsong>
Submitted:  Mon 30 Mar 2015 12:26:16 AM UTC
   
 
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Invalid Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  None

Thu 02 Apr 2015 01:12:57 PM UTC, comment #4: 

Yes, you can't change the privacy after entering a bug report.  However, you can enter a bug report as `private'.

Werner LEMBERG <wl>
Group administrator
Wed 01 Apr 2015 05:21:44 PM UTC, comment #3: 

Thanks for the proposed solution. I have fixed the reported problem per your suggestion. BTW, it seems that I don't have a chance to change the privacy after I create a new report.

Jun Fang <sanqingsong>
Mon 30 Mar 2015 05:40:18 AM UTC, comment #2: 

The embedded font `AAAAAC+FreeSerif' in the example document is buggy.  It contains a nested function definition in the `fpgm' table (within FDEF #18), most probably due to a bug in the PDF creator's font subsetting engine.  Consequently, FT_Load_Glyph returns error code 0x89, `Nested_DEFS', for all glyphs.

FreeType's behaviour is right: A font with a broken fpgm table can't be displayed correctly.  The solution is trying to re-load the affected glyph(s) without hinting.

The attached file contains the diff between FreeSerif.ttf's `fpgm' table (version Version 0412.2263) and the table of the embedded font.

This is not a bug in FreeType, thus closing.

BTW, you can set an issue to `private' by yourself while reporting.  I will soon set this report back to `public' in case you don't object.

(file #33487)

Werner LEMBERG <wl>
Group administrator
Mon 30 Mar 2015 12:26:59 AM UTC, comment #1: 

please set this issue as private, thanks!

Jun Fang <sanqingsong>
Mon 30 Mar 2015 12:26:16 AM UTC, original submission:  

The original report is in https://code.google.com/p/chromium/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Pri%20M%20Week%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified&groupby=&sort=&id=465322.

I debugged this issue and found the rendering failed in pdfium due to some errors returned from tt_size_run_fpgm( size, pedantic). If I change the code and ignore these errors. The text can be displayed correctly.

Foxit adopted a workaround to resolve this issue in src\truetype\ttobjs.c. The details is shown as below:

    error = tt_size_run_fpgm( size, pedantic );
                /* It seems fpgm proc is causing some problem for some font, so we ignore the error. TESTDOC: Bug #12690 - Restaurantkarte_Oktober09+Wild.pdf*/
                if ( error )
      tt_size_done_bytecode( ftsize );
                return TT_Err_Ok;

Jun Fang <sanqingsong>

 

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

Attached Files
file #33487:  example_008.fpgm.diff added by wl (1KiB - text/x-patch)
file #33483:  example_008.pdf added by sanqingsong (116KiB - application/pdf)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Updated the item)
  • -email is unavailable- added by sanqingsong (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-04-01 wl PrivacyPrivate Public
    2015-03-30 wl Attached File- Added example_008.fpgm.diff, #33487
        StatusNone Invalid
        Assigned toNone wl
        Open/ClosedOpen Closed
    2015-03-30 wl PrivacyPublic Private
    2015-03-30 sanqingsong Attached File- Added example_008.pdf, #33483

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code