Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.21, 3.0.0 PDFBox
-
None
Description
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
Attachments
Attachments
Issue Links
- is caused by
-
PDFBOX-4882 Two conditions are always false in TrueTypeEmbedder.isEmbeddingPermitted
- Closed
- links to