You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Larry Lynn (Jira)" <ji...@apache.org> on 2021/05/11 16:49:00 UTC

[jira] [Created] (PDFBOX-5191) isEmbeddingPermitted() is too restrictive on TTFs with OS2 table versions 0-2

Larry Lynn created PDFBOX-5191:
----------------------------------

             Summary: isEmbeddingPermitted() is too restrictive on TTFs with OS2 table versions 0-2
                 Key: PDFBOX-5191
                 URL: https://issues.apache.org/jira/browse/PDFBOX-5191
             Project: PDFBox
          Issue Type: Bug
          Components: PDModel
    Affects Versions: 2.0.21, 3.0.0 PDFBox
            Reporter: Larry Lynn


PDFBOX-4882 fixed a bug that made isEmbeddingPermitted() too permissive.  But it introduced a bug that made isEmbeddingPermitted() too restrictive for TTFs with OS2 table versions 0-2.

 

TTFs with OS2 table versions 0-2 can have multiple permission bits set.  According to the spec described in 

[https://docs.microsoft.com/en-us/typography/opentype/spec/os2#fstype]

"in the event that more than one of bits 0 to 3 are set in a given font, then the _least-restrictive permission indicated take precedence_."

Unfortunately, the current code essentially makes the most restrictive permission take precedence.  This causes pdfbox to throw an error: 

"This font does not permit embedding"

when attempting to process fonts that worked fine in pdfbox v2.0.20 and lower



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org