Skip to content

Handle non-array cm transforms while reading graphics stream from PDFs#4965

Merged
jtanx merged 1 commit intofontforge:masterfrom
aidos:type-3-non-array-cm
Mar 25, 2022
Merged

Handle non-array cm transforms while reading graphics stream from PDFs#4965
jtanx merged 1 commit intofontforge:masterfrom
aidos:type-3-non-array-cm

Conversation

@aidos
Copy link
Copy Markdown
Contributor

@aidos aidos commented Mar 24, 2022

  • Bug fix

Currently the PDF graphics stream reader expects cm operations to have been preceded by an array of 6 values, but the spec suggests that we should be expecting numbers instead.

"Although operands specify a matrix, they shall be written as six separate numbers, not as an array."

This fix allows for popping the number operands from the stack. I've left the array behaviour in place because there are bound to be non-compliant writers producing array versions.

@jtanx jtanx merged commit aa7d991 into fontforge:master Mar 25, 2022
Omnikron13 pushed a commit to Omnikron13/fontforge that referenced this pull request May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants