ubuntu / yaru

All Ubuntu Yaru GNOME themes
https://community.ubuntu.com/c/desktop/theme-refresh
GNU General Public License v3.0
1.36k stars 182 forks source link

Although you export as PNG, please do not use clip or mask. You can keep blur and shadow. #1889

Closed gusbemacbe closed 4 years ago

gusbemacbe commented 4 years ago

Hello people from Canonical!

We use your SVG icons for our third-party icons themes.

I suggest you do not use mask and clip for the icons in Inkscape, because they are visible in KDE. You know KDE does not support SVG clip and mask. Although KDE does not support SVG blur and shadow, you can keep them.

I know you export icons as PNG for your icons theme, but we use SVG instead for retina computers and keep less file size to save more space.

Instead of clipping or masking, I suggest you make native gradients and vectorize the objects manually.

clobrano commented 4 years ago

Hi @gusbemacbe, thanks for the feedback!

/cc @ubuntujaggers :eyes:

ubuntujaggers commented 4 years ago

Thanks @gusbemacbe - when I desquircled the icons I removed a lot of clipping (I also prefer having vectors that are the shape you see rather than hiding parts of them) but I didn't realise KDE didn't support clipping, so there's still a lot of it in the icon set.

I want to do a general "spring clean" of the SVGs to tidy up sub-pixel imperfections and make sure everything is in the right layer, now we have more contributors joining in, and also to add a full colour template for each shape. So, I will take the opportunity to remove all clipping and masking :+1:

gusbemacbe commented 4 years ago

@ubuntujaggers

didn't realise KDE didn't support clipping, so there's still a lot of it in the icon set.

You can check the bug tickets from KDE site:

These tickets show KDE does not support some SVG features because it uses still old QT SVG version.

I have sent to Nate from KDE team in his blog, asking about SVG status. Maybe I must recall @Pointedstick to see our issue.

ow we have more contributors joining in, and also to add a full colour template for each shape.

If you want, I can do it. I have corrected a lot of SVG files that contained clip and mask.

gusbemacbe commented 4 years ago

If you want to see what something wrong with the SVG icons on KDE, check the previews. Using Dolphin on KDE:

Before:

image

You can see that the letter is in wrong position, because you did not convert text in vector. KDE does not support that feature. I have corrected it on my third-party icons theme:

After:

image

Still, more things:

Before:

image

This clipped or masked shadow is exposed on KDE.

I corrected it:

After:

image

The video icon, which is masked, before:

image

Corrected icon after:

image

And the trash icon, before:

image

I corrected it, after:

image

Feichtmeier commented 4 years ago

Thank you very much for your info @gusbemacbe

This sounds like something we should fix, though I'm not sure when since I guess we've done this in almost any icon?

What I don't understand is: if we export the svgs to pngs like we do in this repository does that problem gets exported, too?

gusbemacbe commented 4 years ago

@Feichtmeier

This sounds like something we should fix, though I'm not sure when since I guess we've done this in almost any icon?

Just few icons whose clips and masks are visible. You do not need to install KDE. Install only complete Dolphin with thumbnail plugin to find which SVG files whose clips and masks are exposed.

What I don't understand is: if we export the svgs to pngs like we do in this repository does that problem gets exported, too?

No, it does not, PNG exported from SVG containing clips and masks are already PNGs. Any PNG file exported from vector editor, containing any clip and any mask, looks totally great on KDE. The problem happens only on SVG files, the which we use as icons for KDE.

Feichtmeier commented 4 years ago

@gusbemacbe okay! Thanks for clarifying.

I have to admit that I'm not sure about this. KDE users could install the yaru icon theme and use it with the PNGs, right?

gusbemacbe commented 4 years ago

@Feichtmeier

KDE users could install the yaru icon theme and use it with the PNGs, right?

Yes, in the Yaru icons theme on KDE, everything is PNG and OK. No problems. But the problem is only with the SVG files on KDE. We use the SVG for icons theme.

If you ask why we do not export to PNG, so every problem gets solved... Two examples. Let you imagine...

1st Example

30 icons * 14 sizes = 420 icons

And

(100 KB * 30 icons) * 14 increasing times
33000 KB * 14 increasing times
462000 KB = 462 MB

I already export icons only as SVG, no need to export by size and by time (@2x), because SVG is already scalable, and all size folders, including @2x are symlinked.

There are only 60 icons with totally 6 MB.

2nd Example

Let me use the Papirus icons theme which are totally SVG and look great on KDE. Papirus has 69.7 MB and has 61k files.

If I export all Papirus icons with 15 sizes as PNG, it will be like:

69.7 MB * 15 times
1045.5 MB = 1 GB
Feichtmeier commented 4 years ago

If you ask why we do not export to PNG, so every problem gets solved... Two examples. Let you imagine...

Nono, totally understandable you want to use SVGs. We currently only provide this extra bonus because we want to have sharp icons for every possible size used in the gnome desktop.

So gnome supports this clip or mask and KDE does not? Is it a new feature for newer SVG versions?

gusbemacbe commented 4 years ago

So gnome supports this clip or mask and KDE does not?

Yes, GNOME does. GNOME supports almost all old and new SVG features, except two features – not supported by both GNOME and KDE:


image

image

image

gusbemacbe commented 4 years ago

Hello @Feichtmeier and @ubuntujaggers !

Nate has informed that it is up to QT, they do not have a special KDE SVG renderer, they just use QT's.

I will talk with QT developers.

madsrh commented 4 years ago

Can I close this issue @gusbemacbe ?

We're aware of the problem and will avoid using clip and mask in the future. Also Stuart has planned a "spring cleaning".

Hello people from Canonical!

By the way, no one here is from Canonical 😉 Just a passionate community ❤️

gusbemacbe commented 4 years ago

Can I close this issue @gusbemacbe ?

Yes.

We're aware of the problem and will avoid using clip and mask in the future. Also Stuart has planned a "spring cleaning".

Yes, and the KDE users of Yaru icons theme will be happy.