Repository navigation
Support floating point viewbox in resvg binary - #875
Conversation
| if let (Some(w), Some(h)) = (args.width, args.height) { | ||
| default_size = usvg::Size::from_wh(w as f32, h as f32).unwrap(); | ||
| fit_to = FitTo::Size(w, h); | ||
| fit_to = FitTo::Size(w as f32, h as f32); |
There was a problem hiding this comment.
Would it make sense for these arguments to themselves be floats? I think probably not, because they need to be positive and finite. But creating a massive image can still cause issues.
There was a problem hiding this comment.
Let's ignore this for now, if you want to render such big images you are going to have other problems. 😄
|
don't want to be annoying, but - ping! I'm still waiting on this so I can stop having inkscape as a dependency in my software =w= |
|
a-another ping 😓 sorry… impatient |
|
What’s missing for this? Just a bump in tiny skia? |
|
That's my understanding, yes. Once that's available then we can bump dependencies here (and consider a resvg release?). The only question is if it's useful to have width and height directly parsed from the command line as f32 as @DJMcNab has pondered. If you used |
|
Thanks, will do my best to take a closer soon. Sorry for the delay. |
|
Had to update two test cases, but only with very minimal pixel differences. I added a git dependency now because I think it'll still be a while until the next release. I think we can merge this as is, @DJMcNab wdyt? |
|
I'd be hesistant to land a git dependency here - I'm not sure when we would otherwise made a Tiny Skia release, so using this to force that is probably worthwhile. @jermy, would you be willing to help here? The way to unblock a Tiny Skia release is to go through the changes since the last release, and check if any of them are breaking. At the same time, it would be great to add them to the Unreleased section of the changelog. If they aren't, we should be able to make a bump fairly easily. Unfortunately, if there are breaking changes, the path forward is less clear. |
|
It is a breaking change I think, because new methods were added in the PR to |
|
hey, hate to bump, but what is the course of action from here? is there any way I can help get this through faster? I would really like to have this so I can replace inkscape with resvg as my primary SVG rasterizer… |
|
Sorry about that. :( The reason nothing is happening is basically 1) No one's really been actively developing resvg in recent months (I guess mostly because of being busy with other stuff) and 2) tiny-skia is basically unmaintained at this point (we have our own new CPU renderer that we are developing), and therefore there's little motivation to add new features and updates to the crate... So things are basically not moving at all at the moment. 😅 Hopefully this can change soon, but hard to say. :/ |
|
I'm wondering though, is that really such a critical thing to have? To me it seems like a pretty small edge case, no? |
|
This is unblocked now. The reason it stalled (needing I confirmed the bug is still live on main. Red extends to pixel 60, i.e. 1.2 ÷ 2.0, so the 1.5 viewBox is being rounded up. I rebased locally to check it works: dropped the git pins, resolved the conflicts, builds clean and all 1,793 tests pass. Afterwards red extends to pixel 80 (1.2 ÷ 1.5), the corner is blue, and there's no green anywhere. Two things worth noting from the rebase:
@jermy are you still up for finishing this? Happy to push the rebase if it's easier. @RiedleroD , sorry it took so long. |
|
all that matters is that it's getting done eventually ^^ I'm just happy it's not being dropped |
I'm fairly busy at the moment - I don't have any issue with you taking this and doing that rebase and rework as you see fit. Thank you. |
Hey @luisbg are you a new maintainer to resvg? |
|
I am just helping, not a maintainer. Let me ask when a new version will be released. |
|
No release scheduled, unless there is something important. |
Avoid rounding sizes for images until creating the pixmap, and always use the ceil for that to avoid truncating images. This requires a corresponding change to tiny-skia to add scale_by/scale_to_width/scale_to_height functions to tiny_skia_path::Size to match the implementations in IntSize.
5f52038 to
f9bc393
Compare
|
@jermy Thank you again, and very sorry that this took so long. :( |
|
thanks everyone for making this happen ^^ once this lands in a release I can finally go back to using resvg for my image converter script |
* Update Windows release runner to `windows-latest` (linebender#1113) * c-api: add missing SVGZ error enum (linebender#1122) Add the missing `RESVG_ERROR_SVGZ_UNSUPPORTED` enum value to `resvg.h` so the C API enum values remain in sync with the Rust definition and subsequent error codes are not shifted. While we're here, simplify this enum description (as the `svgz` feature is enabled by default) and add the corresponding Qt error string in `ResvgQt.h`. Fixes: linebender#1112. --- Verified against wasm-vips with this sed substitution: https://github.com/kleisauke/wasm-vips/blob/8f38cbbb70d7536bd0f3d70e308c501cbe4f2e22/build.sh#L442-L443 * Add regression test for `fr` resolution in referenced radial gradients (linebender#1123) As requested in linebender#1098 * fix(usvg): use the viewport as the bbox of a sliced <image> (linebender#1077) * Add aarch64 release artifacts for Linux and Windows (linebender#1132) Adds native aarch64 builds to the release workflow. - **Linux aarch64** on the `ubuntu-24.04-arm` runner → `resvg-linux-aarch64.tar.gz`, `usvg-linux-aarch64.tar.gz` - **Windows aarch64** on the `windows-11-arm` runner → `resvg-win-aarch64.zip`, `usvg-win-aarch64.zip` Updates the workflow's actions, two of which still declared the end-of-life node12 runtime: - `alexellis/upload-assets` 0.2.2 → 0.5.0 (node12 → node24) - `battila7/get-version-action` removed — unmaintained since 2021 and node12; the workflow only triggers on `v*` tags, so the version is just `${GITHUB_REF_NAME#v}` - `actions/checkout` v2 → v7, `softprops/action-gh-release` v2 → v3 Renames the existing job to explicitly say `x86_64` and differentiate `aarch64` Closes linebender#968 * Convert CI release job to use a Matrix (linebender#1133) Some CI cleanup suggested by LLM review of linebender#1132. Has been verified as working on my fork. ## Changes made - Collapse the six per-platform release-* jobs into one release-binaries matrix job over {linux, win, macos} × {x86_64, aarch64}. Asset names are derived from the matrix (`resvg-$SUFFIX.{tar.gz,zip}`). This renamea `resvg-win64.zip` / `usvg-win64.zip` to `resvg-win-x86_64.zip` / `usvg-win-x86_64.zip` to match the linux-* / macos-* / win-aarch64 naming. This is a breaking change for anyone scripting downloads of the old names. - Drop the crates/c-api release builds (and the ilammy/msvc-dev-cmd step): their output was never collected or uploaded, so they only cost CI time. - Split the vendored sources archive and the Windows Explorer thumbnailer into their own jobs - Upload assets with `softprops/action-gh-release@v3` files: (already used to create the release) instead of the third-party `alexellis/upload-assets`. * tests: load test fonts in a deterministic order (linebender#1136) `fontdb::load_fonts_dir` walks the directory with `std::fs::read_dir`, which outputs entries in filesystem order. That order is not stable across machines, and the test harness depends on it. Replace `load_fonts_dir` with an explicit sorted list so order is identical everywhere. The whole suite passes unchanged, so no stored reference image depended on the previous ordering. * fix(usvg): inherit `gradientTransform` and `patternTransform` via `href` (linebender#1135) * Inherit `dominant-baseline` into nested `<tspan>` elements (linebender#1086) * Fix bug in filter chains with different filter regions (linebender#1144) * Add support for `plus-lighter` and `lighter` (linebender#1142) * Apply root SVG transform after the `viewBox` mapping (linebender#1085) * Add `--query-bbox` to CLI (linebender#1050) * Support floating point viewbox in resvg binary (linebender#875) * Fix `feMorphology` kernel size and radius rounding (linebender#1120) * Bug fixes for RTL text and `dx`/`dy` (linebender#1145) * Fix font fallback logging and avoid repeated lookups (linebender#1154) * Fix rendering of filters with skews and rotations (linebender#1155) * Fix marker viewport clipping with preserveAspectRatio (linebender#1163) * Resolve paint servers in masks, patterns and `feImage` before caching (linebender#1164) * Optimize clipped layers (linebender#1158) * Remove reference to nonexistent check.py from tests README (linebender#1181) * Install ResvgQt.h with cargo-c (linebender#1182) * Prepare v0.49.0 release (linebender#1183) * fix: Windowsサムネイルの依存版を0.49へ揃える Refs #1 --------- Co-authored-by: TheBestWebsite <[email protected]> Co-authored-by: Kleis Auke Wolthuizen <[email protected]> Co-authored-by: Tim Voßhenrich <[email protected]> Co-authored-by: Stefano <[email protected]> Co-authored-by: Chongyi Zheng <[email protected]> Co-authored-by: Nico Burns <[email protected]> Co-authored-by: Luis de Bethencourt <[email protected]> Co-authored-by: Quaylyn Rimer <[email protected]> Co-authored-by: Teo Mal <[email protected]> Co-authored-by: Matt Hargett <[email protected]> Co-authored-by: Simon Ser <[email protected]> Co-authored-by: Jeremy James <[email protected]> Co-authored-by: WaterWhisperer <[email protected]> Co-authored-by: Laurenz Stampfl <[email protected]> Co-authored-by: Cees-Kettenis <[email protected]> Co-authored-by: Rodrigue Villetard <[email protected]>
##### [v0.49.0](https://github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0490-2026-10-24) This release has an MSRV of 1.85.0 for `usvg` and `resvg` and the C API. ##### Added - `--query-bbox` CLI option to query the drawing bounding box without rasterizing it. ([#1050](linebender/resvg#1050)) - `mix-blend-mode: plus-lighter` (Compositing and Blending Level 2). ([#1142](linebender/resvg#1142)) - `feComposite` `operator="lighter"` (SVG 2). ([#1142](linebender/resvg#1142)) - Prebuilt `aarch64` release binaries for Linux and Windows. ([#1132](linebender/resvg#1132)) ##### Changed - `usvg::BlendMode` and `usvg::filter::CompositeOperator` have new `PlusLighter` and `Lighter` variants. ([#1142](linebender/resvg#1142)) - `Group::layer_bounding_box` of a group without filters is now clipped by its clip path, so clipped groups allocate smaller layers. This also affects the sizes reported by `--query-all` and used by `--export-id`. ([#1158](linebender/resvg#1158)) ##### Fixed - `dominant-baseline` is now correctly inherited by nested `<tspan>` elements, so a nested span stays on the same baseline as its siblings. ([#1086](linebender/resvg#1086)) - Panics and incorrect clipping when a filter region is smaller than its input. ([#1144](linebender/resvg#1144)) - Incorrect transform order on the outermost `svg` element with a `viewBox`. ([#1085](linebender/resvg#1085)) - Relative positioning of right-to-left text with `dx` and `dy`, including text on a path and text decorations. ([#1145](linebender/resvg#1145)) - `text-anchor` now uses the actual extent of a text chunk, which `dx` and `textLength` can change. ([#1145](linebender/resvg#1145)) - Filters inside rotated or skewed groups are now applied in the user space of the group. This fixes the clipping to filter regions and subregions, as well as the direction of offsets, blurs, turbulence and tiles, and the rendering of `feImage`. ([#1155](linebender/resvg#1155)) - `gradientTransform` and `patternTransform` are now inherited via `href`. ([#1135](linebender/resvg#1135)) - The bounding box of an `<image>` with `preserveAspectRatio="… slice"` is now its viewport, so `objectBoundingBox` clip paths, masks and filters on it are resolved correctly. ([#1077](linebender/resvg#1077)) - Markers are now clipped to their viewport instead of their `viewBox` when the aspect ratios differ. ([#1163](linebender/resvg#1163)) - Object bounding box gradients inside masks, patterns and `feImage` filters used by more than one element are now resolved correctly, instead of being rendered as a flat fill or not at all. ([#1164](linebender/resvg#1164)) - `feMorphology` kernels are now symmetric and fractional radii are rounded to the nearest pixel. ([#1120](linebender/resvg#1120)) - Font fallback log messages now always name the correct fallback font family. ([#1154](linebender/resvg#1154)) - The `resvg` CLI no longer rounds fractional image sizes before scaling, and rounds the output size up instead of to the nearest integer. ([#875](linebender/resvg#875)) - The C API header was missing `RESVG_ERROR_SVGZ_UNSUPPORTED`, so all following error codes were off by one. ([#1122](linebender/resvg#1122)) - `cargo-c` now installs `ResvgQt.h` alongside `resvg.h`. ([#1182](linebender/resvg#1182)) ##### [v0.48.1](https://github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0481-2026-08-02) This release has an MSRV of 1.85.0 for `usvg` and `resvg` and the C API. ##### Changed - MSRV lowered from 1.89 to 1.85. ([#1109](linebender/resvg#1109)) - Downgraded strict-num dependency to 0.1.1. This prevents duplicate versions from being included ([#1110](linebender/resvg#1110)) ##### Fixed - Fixed an `as_mut_slice` future-compatibility warning. ([#1108](linebender/resvg#1108)) ##### [v0.48.0](https://github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0480-2026-07-31) This release has an MSRV of 1.89.0 for `usvg` and `resvg` and the C API. The big change in this release is that text support is now backed by [`skrifa`](https://github.com/googlefonts/fontations) and [`harfrust`](https://github.com/harfbuzz/harfrust) rather than [`ttf-parser`](https://github.com/harfbuzz/ttf-parser) and [`rustybuzz`](https://github.com/harfbuzz/rustybuzz): - Moves resvg onto an actively maintained font stack. - Should have faster and more correct text rendering. - Will enable further improvements to things like variable font rendering in future. - May impact binary size (expected +\~500kb for people not otherwise including fontations dependencies in their tree). - May result in small rendering changes compared to older versions of resvg. ##### Added - New `svgz` and `writer` feature gates to reduce the number of required dependencies. ([#1088](linebender/resvg#1088) by [@reed-smout](https://github.com/reed-smout)) - Warnings when parsing malformed paths. ([#1011](linebender/resvg#1011)) - A `Display` implementation for `Units`. ([#986](linebender/resvg#986)) ##### Changed - MSRV bumped from 1.87 to 1.89. The requirement comes from `font-types`. - Text shaping now uses `harfrust` instead of `rustybuzz`, and font parsing uses `skrifa` (fontations) instead of `ttf-parser`. ([#922](linebender/resvg#922) by [@nicoburns](https://github.com/nicoburns)) - Filter input dimension checks are now debug-only assertions. ([#991](linebender/resvg#991)) ##### Fixed - Glyph advances are now calculated correctly. ([#1043](linebender/resvg#1043) by [@fundon](https://github.com/fundon)) - Text nodes now inherit their absolute transform. ([#1040](linebender/resvg#1040) by [@fundon](https://github.com/fundon)) - Fixes related to non-finite values. ([#1049](linebender/resvg#1049) by [@SAY-5](https://github.com/SAY-5)) - Transforms are no longer applied twice in `abs_transform`. ([#1056](linebender/resvg#1056) by [@fundon](https://github.com/fundon)) - `fr` is now resolved for radial gradients referenced via `href`. ([#1098](linebender/resvg#1098) by [@T1mVo](https://github.com/T1mVo)) - Panic in `feComposite` with the `arithmetic` operator when the filter region is larger than the clamped layer. ([#1021](linebender/resvg#1021), [#1007](linebender/resvg#1007)) - Application of `transform` (and other group properties like `opacity`) on a nested `svg` element. - The missing dimension of an `svg` with only `width` or `height` specified is now computed from its `viewBox` aspect ratio. ([#1045](linebender/resvg#1045)) - The `wght` variation coordinate is now set even when `font-weight` has its default value. ([#1099](linebender/resvg#1099)) - The unprefixed `href` attribute now takes precedence over the deprecated `xlink:href` when both are present, as required by SVG 2. ([#1015](linebender/resvg#1015)) - Incorrect y-axis offsets when transforming `feSpotLight` sources. ([#1052](linebender/resvg#1052)) - Panics caused by bounding boxes that exceed the supported integer range. ([#989](linebender/resvg#989)) ##### [v0.47.0](https://github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0470-2026-02-05) This release has an MSRV of 1.87.0 for `usvg` and `resvg` and the C API. ##### Added - Focal radius (`fr`) supported for Radial Gradients. ([#1014](linebender/resvg#1014) by [@wmedrano](https://github.com/wmedrano)) - Support for variable fonts based on font-variation-settings CSS property. ([#997](linebender/resvg#997) by [@oetiker](https://github.com/oetiker)) ##### Changed - `tiny-skia` has a major version bump from 0.11 to 0.12.
##### [v0.49.0](https://github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0490-2026-10-24) This release has an MSRV of 1.85.0 for `usvg` and `resvg` and the C API. ##### Added - `--query-bbox` CLI option to query the drawing bounding box without rasterizing it. ([#1050](linebender/resvg#1050)) - `mix-blend-mode: plus-lighter` (Compositing and Blending Level 2). ([#1142](linebender/resvg#1142)) - `feComposite` `operator="lighter"` (SVG 2). ([#1142](linebender/resvg#1142)) - Prebuilt `aarch64` release binaries for Linux and Windows. ([#1132](linebender/resvg#1132)) ##### Changed - `usvg::BlendMode` and `usvg::filter::CompositeOperator` have new `PlusLighter` and `Lighter` variants. ([#1142](linebender/resvg#1142)) - `Group::layer_bounding_box` of a group without filters is now clipped by its clip path, so clipped groups allocate smaller layers. This also affects the sizes reported by `--query-all` and used by `--export-id`. ([#1158](linebender/resvg#1158)) ##### Fixed - `dominant-baseline` is now correctly inherited by nested `<tspan>` elements, so a nested span stays on the same baseline as its siblings. ([#1086](linebender/resvg#1086)) - Panics and incorrect clipping when a filter region is smaller than its input. ([#1144](linebender/resvg#1144)) - Incorrect transform order on the outermost `svg` element with a `viewBox`. ([#1085](linebender/resvg#1085)) - Relative positioning of right-to-left text with `dx` and `dy`, including text on a path and text decorations. ([#1145](linebender/resvg#1145)) - `text-anchor` now uses the actual extent of a text chunk, which `dx` and `textLength` can change. ([#1145](linebender/resvg#1145)) - Filters inside rotated or skewed groups are now applied in the user space of the group. This fixes the clipping to filter regions and subregions, as well as the direction of offsets, blurs, turbulence and tiles, and the rendering of `feImage`. ([#1155](linebender/resvg#1155)) - `gradientTransform` and `patternTransform` are now inherited via `href`. ([#1135](linebender/resvg#1135)) - The bounding box of an `<image>` with `preserveAspectRatio="… slice"` is now its viewport, so `objectBoundingBox` clip paths, masks and filters on it are resolved correctly. ([#1077](linebender/resvg#1077)) - Markers are now clipped to their viewport instead of their `viewBox` when the aspect ratios differ. ([#1163](linebender/resvg#1163)) - Object bounding box gradients inside masks, patterns and `feImage` filters used by more than one element are now resolved correctly, instead of being rendered as a flat fill or not at all. ([#1164](linebender/resvg#1164)) - `feMorphology` kernels are now symmetric and fractional radii are rounded to the nearest pixel. ([#1120](linebender/resvg#1120)) - Font fallback log messages now always name the correct fallback font family. ([#1154](linebender/resvg#1154)) - The `resvg` CLI no longer rounds fractional image sizes before scaling, and rounds the output size up instead of to the nearest integer. ([#875](linebender/resvg#875)) - The C API header was missing `RESVG_ERROR_SVGZ_UNSUPPORTED`, so all following error codes were off by one. ([#1122](linebender/resvg#1122)) - `cargo-c` now installs `ResvgQt.h` alongside `resvg.h`. ([#1182](linebender/resvg#1182)) ##### [v0.48.1](https://github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0481-2026-08-02) This release has an MSRV of 1.85.0 for `usvg` and `resvg` and the C API. ##### Changed - MSRV lowered from 1.89 to 1.85. ([#1109](linebender/resvg#1109)) - Downgraded strict-num dependency to 0.1.1. This prevents duplicate versions from being included ([#1110](linebender/resvg#1110)) ##### Fixed - Fixed an `as_mut_slice` future-compatibility warning. ([#1108](linebender/resvg#1108)) ##### [v0.48.0](https://github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0480-2026-07-31) This release has an MSRV of 1.89.0 for `usvg` and `resvg` and the C API. The big change in this release is that text support is now backed by [`skrifa`](https://github.com/googlefonts/fontations) and [`harfrust`](https://github.com/harfbuzz/harfrust) rather than [`ttf-parser`](https://github.com/harfbuzz/ttf-parser) and [`rustybuzz`](https://github.com/harfbuzz/rustybuzz): - Moves resvg onto an actively maintained font stack. - Should have faster and more correct text rendering. - Will enable further improvements to things like variable font rendering in future. - May impact binary size (expected +\~500kb for people not otherwise including fontations dependencies in their tree). - May result in small rendering changes compared to older versions of resvg. ##### Added - New `svgz` and `writer` feature gates to reduce the number of required dependencies. ([#1088](linebender/resvg#1088) by [@reed-smout](https://github.com/reed-smout)) - Warnings when parsing malformed paths. ([#1011](linebender/resvg#1011)) - A `Display` implementation for `Units`. ([#986](linebender/resvg#986)) ##### Changed - MSRV bumped from 1.87 to 1.89. The requirement comes from `font-types`. - Text shaping now uses `harfrust` instead of `rustybuzz`, and font parsing uses `skrifa` (fontations) instead of `ttf-parser`. ([#922](linebender/resvg#922) by [@nicoburns](https://github.com/nicoburns)) - Filter input dimension checks are now debug-only assertions. ([#991](linebender/resvg#991)) ##### Fixed - Glyph advances are now calculated correctly. ([#1043](linebender/resvg#1043) by [@fundon](https://github.com/fundon)) - Text nodes now inherit their absolute transform. ([#1040](linebender/resvg#1040) by [@fundon](https://github.com/fundon)) - Fixes related to non-finite values. ([#1049](linebender/resvg#1049) by [@SAY-5](https://github.com/SAY-5)) - Transforms are no longer applied twice in `abs_transform`. ([#1056](linebender/resvg#1056) by [@fundon](https://github.com/fundon)) - `fr` is now resolved for radial gradients referenced via `href`. ([#1098](linebender/resvg#1098) by [@T1mVo](https://github.com/T1mVo)) - Panic in `feComposite` with the `arithmetic` operator when the filter region is larger than the clamped layer. ([#1021](linebender/resvg#1021), [#1007](linebender/resvg#1007)) - Application of `transform` (and other group properties like `opacity`) on a nested `svg` element. - The missing dimension of an `svg` with only `width` or `height` specified is now computed from its `viewBox` aspect ratio. ([#1045](linebender/resvg#1045)) - The `wght` variation coordinate is now set even when `font-weight` has its default value. ([#1099](linebender/resvg#1099)) - The unprefixed `href` attribute now takes precedence over the deprecated `xlink:href` when both are present, as required by SVG 2. ([#1015](linebender/resvg#1015)) - Incorrect y-axis offsets when transforming `feSpotLight` sources. ([#1052](linebender/resvg#1052)) - Panics caused by bounding boxes that exceed the supported integer range. ([#989](linebender/resvg#989)) ##### [v0.47.0](https://github.com/linebender/resvg/blob/HEAD/CHANGELOG.md#0470-2026-02-05) This release has an MSRV of 1.87.0 for `usvg` and `resvg` and the C API. ##### Added - Focal radius (`fr`) supported for Radial Gradients. ([#1014](linebender/resvg#1014) by [@wmedrano](https://github.com/wmedrano)) - Support for variable fonts based on font-variation-settings CSS property. ([#997](linebender/resvg#997) by [@oetiker](https://github.com/oetiker)) ##### Changed - `tiny-skia` has a major version bump from 0.11 to 0.12.


Avoid rounding sizes for images until creating the pixmap, and always use the ceil for that to avoid truncating images. This fixes #810.
This requires a corresponding change to tiny-skia to add scale_by/scale_to_width/scale_to_height functions to tiny_skia_path::Size to match the implementations in IntSize.
This won't compile as-is, since it depends on linebender/tiny-skia#146 or a similar change.