;;; This file uses the Guile Picture Language to generate the GNU ;;; Assembly logo variants and favicon. ;;; ;;; The League spartan font is available here: ;;; https://www.theleagueofmoveabletype.com/league-spartan ;;; ;;; After generating the SVG files, any text should be converted to ;;; paths so that viewers don't need to have that font installed. The ;;; picture language cannot do this yet, so I recommend using ;;; Inkscape manually. ;;; ;;; The logo is released under CC-BY-SA 4.0 or any other license as ;;; agreed upon after a vote by the GNU Assembly. ;;; ;;; ~~ Ricardo (import (pict) (srfi :1)) (define palette (list "#073b4c" "#118ab2" "#06d6a0" "#ffd166" "#ef476f")) (define hill-color "#ffe9b2") (define next-color (let ((index 0) (palette* (list-tail palette 1))) (lambda () (set! index (modulo (1+ index) (length palette*))) (list-ref palette* index)))) (define* (wildebeest #:key (color "black")) (fill (path (list (move-to '(14 . 5)) ;; The wildebeest is drawn counter-clockwise, starting from ;; the right horn. ;; head (curve '((-1.6 . 1.2) (-2.5 . 1.4) (-2.5 . 0.7))) (curve '((0 . -0.4) (-1.9 . -5.4) (-2.3 . -5.3))) (curve '((-0.2 . 0) (2 . 4.1) (0.3 . 5.9))) (curve '((-0.9 . 1.2) (-1.9 . 0.8) (-3.2 . 1.1))) (curve '((-0.7 . 0.2) (-0.9 . -0.3) (-1 . -0.7))) (curve '((-0.3 . -1.9) (0.7 . -6.6) (0.4 . -6))) (curve '((-0.67 . 1.32) (-1 . 2.7) (-1.5 . 5.1))) (curve '((-0.5 . 2.5) (-1.6 . 2.8) (-2.3 . 4.8))) (curve '((-1.5 . 4.1) (-2.1 . 8.9) (-1.1 . 11.3))) (curve '((0.5 . 1.3) (0.9 . 1) (2.3 . 0.8))) (curve '((0.3 . 0) (0.7 . -0.7) (1 . -0.7))) (curve '((0.7 . 0) (1.1 . 0.8) (1.8 . 1.2))) (curve '((1.3 . 0.6) (2.5 . 1.5) (2.3 . 1.1))) (curve '((-0.2 . -0.3) (-0.1 . -0.9) (0 . -1.2))) (curve '((0.2 . -0.7) (0.4 . -0.7) (1.6 . -0.2))) ;; right foreleg (curve '((0.7 . 0.3) (1.5 . 0.8) (1.7 . 1.1))) (curve '((0.2 . 0.3) (0.5 . 0.7) (1.9 . 1.3))) (curve '((1 . 0.4) (2.1 . 0.9) (2.1 . 1.1))) (curve '((0 . 0.7) (-1 . 1) (-1.8 . 1.7))) (curve '((-0.8 . 0.7) (-2.4 . 2) (-2.6 . 2.9))) (curve '((-0.2 . 0.7) (2.7 . 4) (3.2 . 4.7))) (curve '((0.1 . 0.8) (0.7 . 0.7) (0.9 . 1.7))) (curve '((0.3 . 0.8) (0.8 . 1.4) (2.4 . 2.8))) (curve '((1.9 . 1.6) (2.5 . 1.6) (2.4 . 1))) (curve '((-0.2 . -0.8) (-0.5 . -4.2) (-1.2 . -4.2))) (curve '((-0.4 . 0) (-0.9 . 0.6) (-1 . 0.2))) (curve '((-0.1 . -0.5) (-0.4 . -0.6) (-0.8 . -0.6))) (curve '((-0.2 . 0) (-1.7 . -2.4) (-2 . -2.4))) (curve '((-0.3 . -0.3) (-1.7 . -2.8) (-1.7 . -2.8))) ;; left foreleg (curve '((0 . 0) (2.3 . -1.7) (2.2 . -1.7))) (curve '((0 . 0) (-1.2 . 1.7) (-1.9 . 3.5))) (curve '((-0.9 . 2.2) (-1.2 . 4.2) (-1.5 . 4.8))) (curve '((-0.2 . 0.4) (-0.5 . 0.5) (-1 . 1.3))) (curve '((-0.5 . 0.8) (-0.7 . 1.6) (-0.1 . 2.8))) (curve '((0.4 . 0.9) (4 . -2.2) (3.4 . -3.7))) (curve '((-0.4 . -1.10) (0.5 . -3.4) (0.7 . -4.1))) (curve '((0.5 . -1.8) (1.7 . -3.1) (3.2 . -4.4))) (curve '((2.5 . -2) (2.2 . -2) (9.1 . -0.7))) ;; left hindleg (curve '((2.8 . 0.5) (2.8 . 0.2) (4.9 . 2.7))) (curve '((1.1 . 1.4) (4 . 3.9) (5.1 . 6.4))) (curve '((0.2 . 0.4) (0.3 . 0.7) (0.3 . 1.2))) (curve '((-0.4 . 1.5) (-0.3 . 3.7) (-1.4 . 5))) (curve '((-0.5 . 1) (-1.5 . 2.1) (0.2 . 1.9))) (line-to '(2.2 . 0)) (line-to '(0.3 . -2.3)) (curve '((0.3 . -2.2) (0 . -5) (0.4 . -7.2))) (curve '((0.1 . -0.2) (-3.8 . -4) (-3.8 . -4.4))) (curve '((0 . -0.5) (-0.2 . -2.8) (0 . -2.7))) ;; right hindleg (curve '((0.2 . 0.1) (0.4 . 3.7) (0.5 . 4.2))) (curve '((0.1 . 0.6) (-0.5 . 1.6) (-2.6 . 3.6))) (curve '((-3.1 . 3) (-4.3 . 4.6) (-4.4 . 5.4))) (curve '((0 . 0.8) (2.2 . 0.7) (2.9 . -0.1))) (curve '((0.4 . -0.4) (1 . -2.4) (1 . -2.4))) (curve '((1.4 . -1.4) (3 . -3.2) (4.1 . -3.7))) (line-to '(1 . -1.9)) (curve '((0.1 . -1.7) (-1 . -7.2) (0.3 . -8.8))) (curve '((0.3 . -0.4) (1.2 . -3) (1.2 . -3))) ;; tail (curve '((0.5 . 1.8) (4 . 4.7) (4 . 4.7))) (curve '((-0.5 . -0.8) (-0.4 . -0.9) (-0.4 . -0.9))) (curve '((0 . 0) (2.8 . 0.9) (4.2 . 0.5))) (curve '((2 . -0.6) (4.8 . -4) (4.8 . -4))) (curve '((-1.3 . 1.1) (-1.3 . 0.8) (-2.5 . 1.2))) (curve '((0 . 0) (0.8 . -1) (1.1 . -1.4))) (curve '((1 . -1.4) (1.6 . -3.6) (2 . -5.1))) (curve '((-0.2 . 0.4) (-0.4 . 0.4) (-0.5 . 0.4))) (curve '((-0.2 . -0.6) (1.1 . -3.3) (1.1 . -3.3))) (curve '((-0.9 . 0.9) (-1.8 . 1.8) (-2.6 . 3.2))) (curve '((-1.3 . 2.2) (-2.4 . 4.7) (-4.4 . 6.2))) (curve '((-1.3 . 1) (-4.8 . -2) (-4.8 . -2))) (curve '((-1.4 . -0.9) (-1.5 . -2.1) (-1.7 . -2.1))) ;; back (line-to '(0.1 . 0.2)) (curve '((0.2 . -2.4) (-3 . -5.4) (-4.4 . -6.3))) (curve '((-5.8 . -1.4) (-7.4 . -2.16) (-9.8 . -3.9))) (curve '((0 . 0) (2.8 . 0.4) (3.3 . -0.8))) (curve '((-1.1 . 0.6) (-3.6 . -0.2) (-5.6 . -1.2))) (curve '((-3.5 . -1.9) (-4 . -2.6) (-5.2 . -2.6))) (curve '((-0.8 . 0) (-1.9 . -0.2) (-1.9 . -1))) (curve '((-0.1 . -0.8) (0.3 . -0.8) (1.5 . -1.2))) (curve '((-0.7 . -0.1) (-2.5 . 0.2) (-3.6 . 1.1))) (close-path)) #:stroke-width 0) color)) (define parliament (begin (next-color)(next-color) (rotate (apply cc-superimpose (map (lambda (n) (let ((segment (disk 18 #:color (next-color)))) (rotate (expand segment #:right 130) (* n 24)))) (iota 8))) -35))) (define hill (scale (fill (polygon '((0 . 30) (10 . 30) (20 . 25) (40 . 20) (60 . 5) (80 . 10) (100 . 30)) #:border-width 0) hill-color) 2.8)) (define composition (expand (cc-superimpose (expand parliament #:bottom 40) (expand hill #:top 20) (expand (scale (wildebeest #:color (first palette)) 2.8) #:left 80)) #:bottom -50 #:left -20)) (define composition-with-text (expand (vc-append composition (hb-append (text "the" #:border-width 0 #:font-family "League spartan Light" #:color (first palette) #:font-size 32) (expand (text "gnu" #:border-width 0 #:font-family "League spartan ExtraBold" #:color (second palette) #:font-size 32) #:left 5 #:right 5) (text "assembly" #:border-width 0 #:font-family "League spartan Light" #:color (first palette) #:font-size 32))) #:bottom 10)) (define favicon (let ((circles (expand (scale parliament 0.5) #:amount -10))) (scale (cc-superimpose (filled-rectangle (pict-width circles) (pict-height circles) #:color "white") circles (expand (text "g" #:border-width 0 #:font-family "League spartan ExtraBold" #:color (first palette) #:font-size 64) #:left 5)) 0.3))) (define small-wildebeest (wildebeest #:color (first palette))) (pict->file composition-with-text "/tmp/logo.svg") (pict->file composition "/tmp/logo-small.svg") (pict->file favicon "/tmp/favicon.svg") (pict->file small-wildebeest "/tmp/wildebeest.svg")