summaryrefslogtreecommitdiff
path: root/logo/elenq.scm
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2025-01-10 12:25:42 +0100
committerEkaitz Zarraga <ekaitz@elenq.tech>2025-01-10 12:25:42 +0100
commita3c280b1ce9e9d6c4c920b668ff4061ff6bc279d (patch)
tree1dca05f46364b10ee6da5de7ee65004a88b6c1d9 /logo/elenq.scm
parent42e898f1f7b02c8b8a5b3ca8a2e274672e2545d3 (diff)
logo: scheme: migrate to guile and improve
Diffstat (limited to 'logo/elenq.scm')
-rw-r--r--logo/elenq.scm39
1 files changed, 39 insertions, 0 deletions
diff --git a/logo/elenq.scm b/logo/elenq.scm
new file mode 100644
index 0000000..ffd04dd
--- /dev/null
+++ b/logo/elenq.scm
@@ -0,0 +1,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)))