From a3c280b1ce9e9d6c4c920b668ff4061ff6bc279d Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Fri, 10 Jan 2025 12:25:42 +0100 Subject: logo: scheme: migrate to guile and improve --- logo/elenq.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 logo/elenq.scm (limited to 'logo/elenq.scm') 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))) -- cgit v1.2.3