[
https://issues.apache.org/jira/browse/PDFBOX-3093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15000784#comment-15000784
]
ASF subversion and git services commented on PDFBOX-3093:
---------------------------------------------------------
Commit 1713905 from [~tilman] in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1713905 ]
PDFBOX-3093: skip tables with 0 length, as suggested by Timur Kamalov
> Exception in TTFParser
> ----------------------
>
> Key: PDFBOX-3093
> URL: https://issues.apache.org/jira/browse/PDFBOX-3093
> Project: PDFBox
> Issue Type: Bug
> Components: FontBox
> Affects Versions: 2.0.0
> Reporter: Timur Kamalov
> Fix For: 2.0.0
>
> Attachments: PT-286.pdf,
> Skipping_font_tables_with_zero_length_.patch, resfont.ttf
>
>
> The reason for this is an ambiguity in the TrueType specification. Namely,
> one of the font tables (OS/2) is present in the font directory with length 0.
> The specification itself is completely silent about this.
> The only other information I was able to find is:
> - the FreeType font library
> (http://www.freetype.org/freetype2/docs/reference/ft2-truetype_tables.html#FT_Sfnt_Table_Info)
> assumes that any table having 0 length in the font directory is treated as
> missing.
> - Google OpenType Sanitizer would report an error in such situation:
> https://github.com/khaledhosny/ots/blob/master/src/ots.cc, lines 575-578
> - there are several related discussions at Adobe forums:
> https://forums.adobe.com/thread/1616317 ,
> https://forums.adobe.com/thread/1611899
> As allowing zero length tables in TrueType fonts seems to be quite logical
> (and also implicitly confirmed by Adobe Acrobat validator), I've changed the
> TTFParser to skip tables with 0 length.
> Attaching patch and font file. Will add test file also if necessary.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]