Skip to content

Commit a66152c

Browse files
authored
logo: refactor SVG sources (#536)
1. curl logos: - use original `OCRAStd.otf` glyph exports for characters (exported via FontForge). - use native SVG shapes (replacing paths) where possible. - use all-integer coordinates. - retain existing shapes losslessly. - rework/simplify minimization steps. - possible to edit them without a GUI editor. - possible to use individual colors for any element. New sizes (in bytes): curl-logo-master: 1630 (was: 8273) curl-logo: 1444 (657 w/ brotli q=11) (was: 2787) curl-symbol: 509 (was: 1092) curl-white-symbol: 473 (was: 1086) curl-up: 2428 (was: 7958) Could be minimized more by dropping newlines, but it hinders readability. Inspired-by: Йоте <https://social.net.ua/users/joter> 2. remaster wcurl logo: - reuse curl-logo glyphs as-is. - use shapes. - fix minor irregularities and minimization artifacts. - sync tray symbol thickness with the circle's. (it's less thick now than before.) - use all-integer coordinates. - add editable master copy. wcurl-logo size (in bytes): 1644 (was: 3301) 3. add the smallest SVG curl logo made by Йоте. via https://mastodon.social/@joter@social.net.ua/115861547891486989 More size reductions contributed by: - Йоте <https://social.net.ua/users/joter> https://mastodon.social/@joter@social.net.ua/115865310124914973 - erinaceus <https://chaos.social/@erinaceus> https://blog.strangerthanusual.de/blogposts/curl_logo_optimization https://mastodon.social/@erinaceus@chaos.social/115866618733709150 - @vszakats Also fix for the left slash (that added 4 .5 decimals). Currently at: 734 bytes, 717 /w svgo, 352 /w brotli q=11. Follow-up to 04a61ba #531
1 parent 4cbe2f8 commit a66152c

22 files changed

Lines changed: 161 additions & 339 deletions

.github/scripts/pyspelling.words

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ enum
211211
epoll
212212
EPRT
213213
EPSV
214+
erinaceus
214215
ERRNO
215216
errno
216217
ESNI
@@ -784,6 +785,7 @@ svc
784785
svcb
785786
SVG
786787
svg
788+
svgo
787789
Svyatoslav
788790
Swisscom
789791
sws

.github/workflows/pyspelling.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
persist-credentials: false
4343

4444
- name: strip "uncheckable" sections from .md pages
45-
run: find docs -name '*.md' -print0 | xargs -0 -t -n1 .github/scripts/cleanspell.pl
45+
run: find docs logo -name '*.md' -print0 | xargs -0 -t -n1 .github/scripts/cleanspell.pl
4646

4747
- name: 'install'
4848
run: |

logo/README.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Applied minor fixes and tweaks on January 6, 2026 (by vsz).
2222
|--------------------------------------------------|-------|------------|-----------------|
2323
| [curl-logo.jpg](curl-logo.jpg) | 80K | 2000 x 551 | JPEG |
2424
| [curl-logo.png](curl-logo.png) | 51K | 2000 x 551 | PNG |
25-
| [curl-logo-inkscape.svg](curl-logo-inkscape.svg) | 8K | vector | SVG |
26-
| [curl-logo.svg](curl-logo.svg) | 2.7K | vector | SVG |
25+
| [curl-logo-master.svg](curl-logo-master.svg) | 1.7K | vector | SVG |
26+
| [curl-logo.svg](curl-logo.svg) | 1.4K | vector | SVG |
2727
| [curl-transparent.png](curl-transparent.png) | 51K | 2000 x 551 | transparent PNG |
2828

2929
## The curl symbol
@@ -33,10 +33,24 @@ Applied minor fixes and tweaks on January 6, 2026 (by vsz).
3333
| File | Size | Resolution | Format |
3434
|------------------------------------------------------------|------|------------|-----------------|
3535
| [curl-symbol.jpg](curl-symbol.jpg) | 37K | 672 x 566 | JPEG |
36-
| [curl-symbol.png](curl-symbol.png) | 24K | 672 x 566 | PNG |
37-
| [curl-symbol-inkscape.svg](curl-symbol-inkscape.svg) | 4.6K | vector | SVG |
38-
| [curl-symbol.svg](curl-symbol.svg) | 1.1K | vector | SVG |
39-
| [curl-symbol-transparent.png](curl-symbol-transparent.png) | 24K | 672 x 566 | transparent PNG |
36+
| [curl-symbol.png](curl-symbol.png) | 23K | 672 x 566 | PNG |
37+
| [curl-symbol.svg](curl-symbol.svg) | 509 | vector | SVG |
38+
| [curl-symbol-transparent.png](curl-symbol-transparent.png) | 23K | 672 x 566 | transparent PNG |
39+
| [curl-white-symbol.svg](curl-white-symbol.svg) | 473 | vector | SVG (white) |
40+
41+
## Smallest curl vector logo winner
42+
43+
Caveat: not identical to the official logo.
44+
45+
| File | Size | Resolution | Format |
46+
|------------------------------------------------------------|------|------------|-----------------|
47+
| [curl-logo-tiny.svg](curl-logo-tiny.svg) | 734 | vector | SVG |
48+
49+
717 bytes with svgo, 352 with brotli q=11.
50+
51+
Made by [Йоте](https://social.net.ua/users/joter) via <https://social.net.ua/notice/B25SxW3zQZFV1GDGbI>
52+
53+
Further minimization by: [erinaceus](https://chaos.social/@erinaceus), vsz
4054

4155
## curl up
4256

@@ -45,7 +59,7 @@ Applied minor fixes and tweaks on January 6, 2026 (by vsz).
4559
| File | Size | Resolution | Format |
4660
|----------------------------|------|------------|--------|
4761
| [curl-up.png](curl-up.png) | 63K | 2500 x 688 | PNG |
48-
| [curl-up.svg](curl-up.svg) | 7.8K | vector | SVG |
62+
| [curl-up.svg](curl-up.svg) | 2.5K | vector | SVG |
4963

5064
## trurl
5165

@@ -65,10 +79,11 @@ by Christian Plaza.
6579

6680
<img src="wcurl-logo.svg" width=500>
6781

68-
| File | Size | Resolution | Format |
69-
|----------------------------------|------|------------|--------|
70-
| [wcurl-logo.png](wcurl-logo.png) | 49K | 2000 x 501 | PNG |
71-
| [wcurl-logo.svg](wcurl-logo.svg) | 3.3K | vector | SVG |
82+
| File | Size | Resolution | Format |
83+
|------------------------------------------------|------|------------|--------|
84+
| [wcurl-logo.png](wcurl-logo.png) | 49K | 2000 x 501 | PNG |
85+
| [wcurl-logo-master.svg](wcurl-logo-master.svg) | 2.1K | vector | SVG |
86+
| [wcurl-logo.svg](wcurl-logo.svg) | 1.6K | vector | SVG |
7287

7388
## curl logo colors
7489

logo/curl-logo-inkscape.svg

Lines changed: 0 additions & 115 deletions
This file was deleted.

logo/curl-logo-master.svg

Lines changed: 20 additions & 0 deletions
Loading

logo/curl-logo-render.sh

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,41 @@
33
#
44
# SPDX-License-Identifier: curl
55

6-
# requires rsvg-convert, imagemagick, svgcleaner, svgo, jpegoptim, mozjpeg, advpng
6+
# requires rsvg-convert, imagemagick, svgo, jpegoptim, mozjpeg, advpng
77

88
set -eu
99

10-
# curl-logo-inkscape.svg -> open in Inkscape, merge paths of the same color (Path -> Union), ungroup everything, save -> curl-logo-in.svg
10+
# curl-logo-master.svg -> open in Inkscape, merge 'curl' letter paths (Path -> Union), save -> curl-logo-in.svg
1111
f='curl-logo'
1212
if [ -f "$f"-in.svg ]; then
13-
svgcleaner "$f"-in.svg "$f"-tmp1.svg
14-
svgo --pretty --indent 1 "$f"-tmp1.svg
15-
mv "$f"-tmp1.svg "$f".svg
16-
sed -i.bak -E 's/ (height|width)="[0-9]+"//g' "$f".svg
17-
# edit result to remove evenodd group.
13+
svgo --pretty --indent 1 "$f"-in.svg
14+
mv "$f"-in.svg "$f".svg
15+
# manually optimize style="fill:#012345" to fill="#012345"
1816
fi
1917

2018
rsvg-convert --width 2000 --keep-aspect-ratio curl-logo.svg --output curl-transparent.png
2119
rsvg-convert --width 2000 --keep-aspect-ratio curl-logo.svg --output curl-logo.png --background-color '#ffffff'
2220
magick curl-logo.png curl-logo.jpg
2321

24-
# curl-symbol-inkscape.svg -> open in Inkscape, merge paths of the same color (Path -> Union), ungroup everything, save -> curl-symbol-in.svg
25-
f='curl-symbol'
26-
if [ -f "$f"-in.svg ]; then
27-
svgcleaner "$f"-in.svg "$f"-tmp1.svg
28-
svgo --pretty --indent 1 "$f"-tmp1.svg
29-
mv "$f"-tmp1.svg "$f".svg
30-
sed -i.bak -E 's/ (height|width)="[0-9]+"//g' "$f".svg
31-
# edit result to remove evenodd group.
22+
if [ ! -f curl-white-symbol.svg ]; then
23+
# Delete the redundant nested g stroke group after this
24+
sed -E 's/#[a-f0-9]{6}/#fff/g' < curl-symbol.svg > curl-white-symbol.svg
3225
fi
3326

34-
sed -E 's/#[a-f0-9]{6}/#fff/g' < curl-symbol.svg > curl-white-symbol.svg
35-
3627
rsvg-convert --width 672 --keep-aspect-ratio curl-symbol.svg --output curl-symbol-transparent.png
3728
rsvg-convert --width 672 --keep-aspect-ratio curl-symbol.svg --output curl-symbol.png --background-color '#ffffff'
3829
magick curl-symbol.png curl-symbol.jpg
3930

4031
rsvg-convert --width 2500 --keep-aspect-ratio curl-up.svg --output curl-up.png
4132

33+
# wcurl-logo-master.svg -> open in Inkscape, merge 'curl' letter paths (Path -> Union), save -> wcurl-logo-in.svg
34+
f='wcurl-logo'
35+
if [ -f "$f"-in.svg ]; then
36+
svgo --pretty --indent 1 "$f"-in.svg
37+
mv "$f"-in.svg "$f".svg
38+
# do the above one more time, then manually optimize style="fill:#012345" to fill="#012345"
39+
fi
40+
4241
rsvg-convert --width 2000 --keep-aspect-ratio wcurl-logo.svg --output wcurl-logo.png
4342

4443
# Further losslessly compress bitmaps:

logo/curl-logo-tiny.svg

Lines changed: 18 additions & 0 deletions
Loading

logo/curl-logo.jpg

391 Bytes
Loading

logo/curl-logo.png

-50 Bytes
Loading

0 commit comments

Comments
 (0)