Conversation
Extend charstring evaluation to support a minimal set of Type1 specific operators.
drott
left a comment
There was a problem hiding this comment.
Impressive level of deep-diving into CFF. Big thanks for digging in!
| } | ||
|
|
||
| #[test] | ||
| fn op_callothersubr_flex() { |
There was a problem hiding this comment.
Would it be possible to exercise a few of the additional new operations be covered in tests, VStem3, HStem3, for example?
There was a problem hiding this comment.
The stem operators aren't implemented in this PR so there's not much to test. Since PDFium doesn't enable hinting for Type1, my inclination is to ignore this for now unless some need pops up in the future. I can however add some tests for div and setcurrentpoint. The only remaining (functional) operator is seac which can't really be tested without additional Type1 infrastructure because we need access to the charstrings.
| /// Type2 charstring. | ||
| /// | ||
| /// See reference at <https://adobe-type-tools.github.io/font-tech-notes/pdfs/5177.Type2.pdf>. | ||
| Type2, |
There was a problem hiding this comment.
Is it possible to cover acceptance/rejection of CharString kind somehow in tests - or exercise usage of this enum?
There was a problem hiding this comment.
Unfortunately, there's not much we can do since we recently removed operator validation to handle a broken font (and match FT) and these basically control which operators are applicable (or adjust behavior).
I can add another set of tests for sbw and hsbw that assert no changes to state in Type2 mode.
Extend charstring evaluation to support a minimal set of Type1 specific operators.