summaryrefslogtreecommitdiff
path: root/logo/elenq.scm
blob: ffd04ddafe4934c960befdbee68e0b68b051021a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
(define-module (elenq)
  #:use-module (sxml simple)
  #:use-module (ice-9 match))

(define (num x)
  (number->string (exact->inexact x)))

(define (elenq-logo sub size rotation-deg x y)
  `(svg
     (@ (width  ,(num (* size)))
        (height ,(num (* size (/ 10 22))))
        (viewBox "0 0 22 10"))
     (g (@ (id "elenq-logo")
        (transform
          ,(string-append
            "translate(" (num x) "," (num y) ")"
            "scale(" (num size)  ")"
            "rotate (" (num rotation-deg) ")")))
     (g (@ (transform "scale(0.33333)"))
        (text (@ (x 0)
                 (y 0)
                 (style "font-size: 30; line-height: 1.25; font-family: armata; stroke: none; text-anchor: middle"))
              "ElenQ")
        (text (@ (x 0)
                 (y 8)
                 (style "font-size: 10; line-height: 1.25; font-family: armata; stroke: none; text-anchor: middle;"))
              ,sub)))))

(define (elenq-technology size rotation)
  (sxml->xml (elenq-logo "TECHNOLOGY" size rotation 11 6.3)))
(define (elenq-publishing size rotation)
  (sxml->xml (elenq-logo "PUBLISHING" size rotation 11 6.3)))

(match (command-line)
  ((name "tech") (elenq-technology 1 0))
  ((name "pub")  (elenq-publishing 1 0))
  ((name . any)  (format (current-error-port)
                         "USAGE: ~a tech|pub\n" name)
                 (exit 1)))