bugThe FreeType Project - Bugs: bug #44169, check required hmtx in TTF

 
 

bug #44169: check required hmtx in TTF

Submitted by:  Aleksei Volkov <master_volkov>
Submitted on:  Tue 03 Feb 2015 10:24:54 AM 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.

 

Wed 04 Feb 2015 10:06:02 AM UTC, comment #4:

Thanks for the answer.

Open a separate tracker issue with category `wishlist': https://savannah.nongnu.org/bugs/?44184

Aleksei Volkov <master_volkov>
Wed 04 Feb 2015 09:36:37 AM UTC, comment #3:

Thanks for the data.

Well, the font in question has an hmtx table. However, it is invalid, since its length value is incorrect. In other words, the font is invalid, and it is fully OK if FreeType rejects malformed data.

Consequently, this is not a bug in FreeType but in the PDF creator engine, and you should file a bug report there.

BTW, I haven't yet seen a PDF that really contains a TTF without an hmtx table. According to section 5.8, `Embedded Font Programs', in the PDF reference version 1.6, an hmtx table must be present.

That Acroread is displaying the PDF file without problems is a different issue, and I ask you to open a separate tracker issue with category `wishlist'.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 03 Feb 2015 10:54:05 AM UTC, comment #2:

Thet bug exist in MuPDF
http://bugs.ghostscript.com/show_bug.cgi?id=695690

with attached bug pdf http://bugs.ghostscript.com/attachment.cgi?id=11327

On poppler i create bug too https://bugs.freedesktop.org/show_bug.cgi?id=88939

Aleksei Volkov <master_volkov>
Tue 03 Feb 2015 10:34:36 AM UTC, comment #1:

Thanks for the report. Please post a PDF file also that contains such a font.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 03 Feb 2015 10:24:54 AM UTC, original submission:

In MS specification TTF in https://www.microsoft.com/typography/tt/ttf_spec/ttch02.doc clean write: table 'hmtx(horizontal metrics)' is required. And in https://www.microsoft.com/typography/tt/ttf_spec/ttch03.doc this required too.
But font without hmtx exist (mostly as embedded font in pdf). I have that example pdf - on Windows they open without any problems but in linux - font is adsent.

I extract these font from my pdf and attach.

With simply patch that font (and pdf) open in linux as well (in poppler font show, but codepage wrong detect - they check hmtx too, but with second simply patch pdf opened normal as in windows adobe pdf viewer).

Can you add fix for embedded font, as added FT_CONFIG_OPTION_INCREMENTAL or print warning and generate dummy hmtx table (or generate full hmtx table for bug fonts) instead return error font opening.

P.S. fontforge open that font without any problem, and can extract thet font from pdf without problem too.

Aleksei Volkov <master_volkov>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #32980:  HPDFAA+ArialMT.ttf added by master_volkov (22KiB - application/x-font-ttf)
file #32982:  HPDFAB+TimesNewRomanPSMT.ttf added by master_volkov (40KiB - application/x-font-ttf)

 

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 master_volkov (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
    Wed 04 Feb 2015 09:36:37 AM UTCwlStatusNeed Info=>Invalid
      Open/ClosedOpen=>Closed
    Tue 03 Feb 2015 11:12:52 AM UTCmaster_volkovAttached File-=>Added 2778 - embedded font without hmtx table.pdf, #32983
    Tue 03 Feb 2015 10:34:36 AM UTCwlStatusNone=>Need Info
      Assigned toNone=>wl
    Tue 03 Feb 2015 10:24:54 AM UTCmaster_volkovAttached File-=>Added HPDFAA+ArialMT.ttf, #32980
      Attached File-=>Added FreeType_Path_hmtx.patch, #32981
      Attached File-=>Added HPDFAB+TimesNewRomanPSMT.ttf, #32982

    Back to the top


    Powered by Savane 3.1-cleanup1