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

Some icons are wrongly rescaled #375

Closed
antonio-rojas opened this issue Jan 7, 2022 · 1 comment · Fixed by #376
Closed

Some icons are wrongly rescaled #375

antonio-rojas opened this issue Jan 7, 2022 · 1 comment · Fixed by #376

Comments

@antonio-rojas
Copy link
Contributor

antonio-rojas commented Jan 7, 2022

Since commit c579095, many icons are wrongly rescaled when indexing metadata, and they take only the first quarter of the canvas. This affects most gnome application icons, for instance the ones from https://archlinux.thaller.ws/extra/os/x86_64/evolution-3.42.2-1-x86_64.pkg.tar.zst

Before c579095:
pre

After c579095:
post

librsvg is at 2.52.5

@heftig
Copy link
Contributor

heftig commented Jan 7, 2022

I think you shouldn't cairo_scale the surface in the path that uses the viewport, as that already takes care of rescaling the svg.

heftig added a commit to heftig/appstream that referenced this issue Jan 7, 2022
We should only scale the canvas in the legacy path, since the viewport
already takes care of scaling.

Also, while we're here:

- We should `cairo_save` before scaling, so that on error the
  `cairo_restore` doesn't leave the canvas in the scaled state.
- The SVG size is only used in the legacy path.
- We don't inspect the error so no need to have `tmp_error`.

Fixes: ximion#375
ximion pushed a commit that referenced this issue Jan 20, 2022
We should only scale the canvas in the legacy path, since the viewport
already takes care of scaling.

Also, while we're here:

- We should `cairo_save` before scaling, so that on error the
  `cairo_restore` doesn't leave the canvas in the scaled state.
- The SVG size is only used in the legacy path.
- We don't inspect the error so no need to have `tmp_error`.

Fixes: #375
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 a pull request may close this issue.

2 participants