Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.19, 3.0.0 PDFBox
-
None
Description
While working on PDFBOX-4749 I've realized that the implementation of a CodespaceRange from a CMap isn't correct.
For one byte ranges startBytes and endBytes define a linear range of values. Double byte values define a rectangular range not a linear range.
Examples:
- <00> <20> defines a linear range from 0x00 up to 0x20
- <8140> to <9FFC> defines a rectangular range. The high byte has to be within 0x81 and 0x9F and the low byte has to be within 0x40 and 0xFC. The old implementation assumes the codespacerange ranges from <8140> to <9FFC>