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

Created on 10 Feb 2020  ·  13Comments  ·  Source: ubuntu/yaru

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.

icon theme

Most helpful comment

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.

All 13 comments

Hi @gusbemacbe, thanks for the feedback!

/cc @ubuntujaggers :eyes:

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:

@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.

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

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?

@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.

@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?

@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

  • You export 30 icons to 16, 24, 32, 48, 64, 256, 512 and 16@2, 24@2, 32@2, 48@, 64@2, 256@2 and 512@2 as PNG. Each icon has 100 KB. 100 KB will increase 14 times (= 14 sizes);
  • How many icons totally did you export and how many MB are there in a folder?
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

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?

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:

  • an embedded image in an SVG file, using the class pattern for applying the filter, does not appear on both GNOME and KDE, but using the class image, without using the class pattern for applying the filter, appears well on both GNOME and KDE;
  • filter feature (using the class pattern) is not supported by both GNOME and KDE.

  • Dolphin

image

  • Nautilus

image

  • Expected

image

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.

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 ❤️

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sicklylife-jp picture sicklylife-jp  ·  3Comments

Feichtmeier picture Feichtmeier  ·  3Comments

snydox picture snydox  ·  3Comments

eaglersdeveloper picture eaglersdeveloper  ·  3Comments

Feichtmeier picture Feichtmeier  ·  3Comments