lukas-w / font-logos

An icon font providing popular linux distro's logos
https://lukas-w.github.io/font-logos
The Unlicense
445 stars 85 forks source link

Simplify some outlines #127

Closed Finii closed 8 months ago

Finii commented 8 months ago

[why] The SVG contains groups of paths that were obviously differently colored before resulting in a glyph with very strange outlines.

[how] Flatten all path to one path. Simplify the path. Hand-optimize some points and remove others. Double points and very sharp tips.

From 511 points to 176.

Reported-by: Aaron Bell <@aaronbell>

Current glyph in font-logos.ttf:

image

New simplified path:

image

Old Tux left and optimized Tux right:

image

Old to new size comparsion (34k -> 5k).

$ ls -l --sort=size vectors
total 648
-rw-rw-r-- 1 fini fini 64358 Nov 18 16:24 openbsd.svg
-rw-rw-r-- 1 fini fini 34033 Nov 18 16:24 tux_old.svg
-rw-rw-r-- 1 fini fini 16595 Nov 18 16:24 illumos.svg
-rw-rw-r-- 1 fini fini 10845 Nov 18 16:24 gnu-guix.svg
-rw-rw-r-- 1 fini fini 10224 Nov 18 16:24 raspberry-pi.svg
-rw-rw-r-- 1 fini fini  7482 Nov 19 18:13 kubuntu.svg
-rw-rw-r-- 1 fini fini  7443 Nov 19 18:13 ferris.svg
-rw-rw-r-- 1 fini fini  7149 Nov 18 16:24 kali-linux.svg
-rw-rw-r-- 1 fini fini  6991 Nov 18 16:24 debian.svg
-rw-rw-r-- 1 fini fini  6628 Nov 18 16:24 docker.svg
-rw-rw-r-- 1 fini fini  6455 Nov 19 18:13 kde-neon.svg
-rw-rw-r-- 1 fini fini  6212 Nov 18 16:24 redhat.svg
-rw-rw-r-- 1 fini fini  6166 Nov 18 16:24 opensuse.svg
-rw-rw-r-- 1 fini fini  5797 Nov 18 16:24 mandriva.svg
-rw-rw-r-- 1 fini fini  5581 Nov 18 16:24 centos.svg
-rw-rw-r-- 1 fini fini  5379 Nov 18 16:24 gentoo.svg
-rw-rw-r-- 1 fini fini  5154 Mär 15 21:55 tux.svg
-rw-rw-r-- 1 fini fini  4910 Nov 19 18:13 codeberg.svg
-rw-rw-r-- 1 fini fini  4768 Nov 18 16:24 elementary.svg
Finii commented 8 months ago

Examining the other big file sized icons...

OH MY

image

314 to 29 points in 3 seconds :unamused:

image 10k -> 1k

And this:

image

218 to 95 points... 16k -> 3.2k

The next in size (raspberry) is already as optimized as possible, point wise:

image

Finii commented 8 months ago

Sorry I did not mean to ping Lukas specifically...

Finii commented 8 months ago

Thank you for reviewing :-)

Finii commented 8 months ago

Did similar things here

Hope most of the really bad things are now fixed. Well, one PR is pending at MaterialDesign, and Codicons also had two broken glyphs. Do you think we should update Codicons? But then a lot icons changed dramatically to some more modern version. Sigh.

hasecilu commented 8 months ago

Do you think we should update Codicons? But then a lot icons changed dramatically to some more modern version. Sigh.

Mmm, seems last update was about 3 years ago, could be that some users are expecting to have the same exact icons as in VSCode.

Also the fact that are some "missing" icons (could be instances in other font sets), there are 387 nf-cod-* icons on NF but 457 on https://github.com/microsoft/vscode-codicons/tree/main/src/icons with 35 changes last year.

Maybe is worth a discussion on NF. Personally I won't oppose to the change because pretty much all the icons for code that arrive to my terminal it's because I'm using fancy plugins on Neovim & other applications, so the maintainers of such plugins are the ones who really control which icons to use, at the end I'm just a final user that uses whatever arrives from upstream.

Finii commented 8 months ago

Thanks for your thoughts! :green_heart:

there are 387 nf-cod-* icons on NF but 457 on ...

Hmm, that does not look like so many, but I have not counted.

And I was mistaken, it was Material that has changed dramatically, the changes in codicons seem all very acceptable and I see no reason to not do it.

And all (that means 100%) of the users I talked to (n = 1) said an update would be welcome :-) The problem is that one can not reach 'the Nerd Font users' in any meaningful manner.

I think this will go. https://www.github.com/ryanoasis/nerd-fonts/pull/1544