[ 
https://issues.apache.org/jira/browse/PDFBOX-5191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17344374#comment-17344374
 ] 

ASF subversion and git services commented on PDFBOX-5191:
---------------------------------------------------------

Commit 1889883 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1889883 ]

PDFBOX-5191: fix bug that made isEmbeddingPermitted() too restrictive, by Larry 
Lynn

> 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
>            Priority: Major
>             Fix For: 2.0.24, 3.0.0 PDFBox
>
>         Attachments: 2021-05-13_15-20-29.png
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to