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

fauntlet - the font gauntlet #679

Merged
merged 10 commits into from
Nov 7, 2023
Merged

fauntlet - the font gauntlet #679

merged 10 commits into from
Nov 7, 2023

Conversation

dfrg
Copy link
Member

@dfrg dfrg commented Oct 30, 2023

This PR adds the elusive tool for comparing output between freetype and skrifa.

There are lots of potential improvements (things I have in mind are "fuzzing" instance parameters as well as support for benchmarking) but I've tried to keep the initial version simple. It does use mmap for reading font files and rayon to process them in parallel as comparisons on large font sets can be quite slow.

@drott your feedback on this would be appreciated. The README (rendered) contains an explicit list of output differences which might be useful. The RegularizingPen type in pen.rs has the code that handles this.

Copy link
Contributor

@drott drott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see this arrive and thank you for building this, a couple of comments below.

fauntlet/src/font.rs Outdated Show resolved Hide resolved
fauntlet/Cargo.toml Show resolved Hide resolved
fauntlet/src/font.rs Outdated Show resolved Hide resolved
fauntlet/src/main.rs Outdated Show resolved Hide resolved
fauntlet/src/pen.rs Show resolved Hide resolved
dfrg added 2 commits November 3, 2023 15:04
- move FreeType and Skrifa specific code into own modules
- move compare_glyphs() function from bin to lib
- add tests for RegularizingPen cases
Copy link
Contributor

@drott drott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the reorganization into separate files, I find it much easier to navigate now, and for adding tests to the RegularizingPen.

@dfrg
Copy link
Member Author

dfrg commented Nov 6, 2023

Thanks for following up. I meant to mark those review items as done but got caught up on the lsb diffs :)

Before merging, I have one more update to this to clean up FT advances (as well as a patch to fontations to fix a couple issues).

- use linearHoriAdvance from glyph slot for FT advances (requires FT_LOAD_LINEAR_DESIGN in unscaled case)
- skip fonts that FT believes are not scalable
@dfrg dfrg merged commit d4651c5 into main Nov 7, 2023
8 checks passed
@dfrg dfrg deleted the fauntlet branch November 7, 2023 03:35
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