Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extracted otf glyphs to test data #478

Closed
dfrg opened this issue Jun 7, 2023 · 2 comments
Closed

Add extracted otf glyphs to test data #478

dfrg opened this issue Jun 7, 2023 · 2 comments
Assignees

Comments

@dfrg
Copy link
Member

dfrg commented Jun 7, 2023

Make sure extract_glyphs.py exports the correct data for CFF fonts, add the constants to font-test-data and use them to actually test charstring evaluation.

@dfrg dfrg self-assigned this Jun 7, 2023
dfrg added a commit that referenced this issue Jun 7, 2023
Adds support for charstring evaluation. Results are passed to an impl of the `CommandSink` trait that provides hooks for processing both path commands and hinting data.

This doesn't do scaling or hinting, but both can be built on top of the sink trait.

Removes the existing "low level" parsing code for now because that did not properly handle the hint/counter masks args in the data stream that depend on tracking the stem hint count (and thus, also recursing into subroutines which can apply stem hints). I'll think about how to properly address this.

Testing is very light. We need a bit more infra for building a full PostScript "font" object from the CFF/CFF2 tables to support more sophisticated evaluation. Opened #478 to track testing.
@dfrg
Copy link
Member Author

dfrg commented Jun 8, 2023

Also add unit tests for each charstring operator!

dfrg added a commit that referenced this issue Jun 13, 2023
Adds support for charstring evaluation. Results are passed to an impl of the `CommandSink` trait that provides hooks for processing both path commands and hinting data.

This doesn't do scaling or hinting, but both can be built on top of the sink trait.

Removes the existing "low level" parsing code for now because that did not properly handle the hint/counter masks args in the data stream that depend on tracking the stem hint count (and thus, also recursing into subroutines which can apply stem hints). I'll think about how to properly address this.

Testing is very light. We need a bit more infra for building a full PostScript "font" object from the CFF/CFF2 tables to support more sophisticated evaluation. Opened #478 to track testing.
@dfrg
Copy link
Member Author

dfrg commented Jun 30, 2023

Extracted glyphs added in #519. Testing is done in #520.

A test for all operators was added in #479.

@dfrg dfrg closed this as completed Jun 30, 2023
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

No branches or pull requests

1 participant