Repository navigation
Conversation
Collaborator
|
Why do we need an Otherwise, looks good. PS: since when we use |
Collaborator
Author
Mainly for convenience, but I'll see whether I can get rid of it.
Since a long time it seems. 😄 |
nicoburns
reviewed
Aug 31, 2025
nicoburns
approved these changes
Aug 31, 2025
nicoburns
added a commit
that referenced
this pull request
Jul 29, 2026
## Changes made - Replaces `rustybuzz` with `harfrust` - Replaces `ttf_parser` with `skrifa` ## Notes - This is failing 23 tests. These probably need to be manually checked. I'm waiting on #954 to investigate these. - This requires an MSRV bump from `1.65` to `1.85` - This will represent a binary size bump for users of `resvg`. ## Production profile The analysis below uses the following "production" profile: ```toml [profile.production] inherits = "release" opt-level = 3 debug = false lto = true codegen-units = 1 strip = true incremental = false ``` ## Binary size analysis: According to `cargo-bloat` (not the most accurate): - `harfrust` and `rustybuzz` are both ~250kb - `ttf_parser` and `read-fonts` are both ~100kb - However, `ttf_parser` includes the metrics outlining functionality of `skrifa`. And skrifa is another ~250kb. Compiling the CLI (which is a much more useful test) with the production profile above (`cargo build --profile production --bin resvg`) I get: - `2.4mb` for `main` - `3.0mb` for this PR **So this PR causes a binary size increase of around `600kb`** ## Compile time analysis Compile times on an M1 Pro (8+2 cores) are shown below (`cargo build`): | Profile | `main` | This PR | | --- | ---| --- | | `debug` | 4.68s | 9.09s | | `release` | 7.64s | 14.84s | | `production` | 24.59s | 34.00s | **So this PR roughly doubles compile times at regular opt settings** (with the effect being less pronounced with LTO and other production optimisation settings enabled) --------- Signed-off-by: Nico Burns <[email protected]> Co-authored-by: Laurenz Stampfl <[email protected]>
dmtrKovalenko
pushed a commit
to dmtrKovalenko/svgr
that referenced
this pull request
Oct 13, 2026
Upstream: linebender/resvg@7b0837a Adaptation: merged upstream's TestMode/render_inner, MAKE_REF reference regeneration (oxipng is optional) and side-by-side diff images written to tests/diffs (gitignored) into the fork's harness, keeping svgr::render with SvgrCache/PixmapPool, preloaded image and sub-SVG data for normal tests and the fork's `-actual.png` output. Public helpers render, render_extra, render_extra_with_scale and render_node keep their names, and images of different sizes now count as a diff instead of panicking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found it really awkward to work with the test harness (generating new reference images, generating diff images, etc.), so I've rewritten it a bit to be more similiar to how we have it in vello_cpu.
First, in case a test fails it now prints a nice diff image that also shows the expected and actual versions on the left/right:

In case you want to override the tests that are currently failing, you can run with
MAKE_REF="" cargo test --releaseto do so.I've raised the pixel diff threshold to 1 because it seems like there are apparently slight differences when loading with the
imagecrate vs. the previous code, not sure if we should set this to 0 and re-add the previously existing code instead.Overall, this will hopefully make it easier to work with the test suite. :)