diff options
-rw-r--r-- | logo/elenq.scm | 39 | ||||
-rw-r--r-- | logo/logos_sxml.scm | 43 |
2 files changed, 39 insertions, 43 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))) diff --git a/logo/logos_sxml.scm b/logo/logos_sxml.scm deleted file mode 100644 index c822897..0000000 --- a/logo/logos_sxml.scm +++ /dev/null @@ -1,43 +0,0 @@ -(import (chibi sxml) - (srfi 1) - (scheme small) - (chibi)) - -(define num number->string) - -(define (elenq-logo sub size x y . extra) ; 10 x 4mm - `(svg - (@ (width "10") - (height "4") - (viewBox "0 0 12 5")) - (g (@ (id "elenq-logo") - (transform - ,(string-append - "translate(" (num x) "," (num y) ")" - "scale(" (num size) ")" - (if (< 0 (length extra)) - (string-append "rotate (" (num (first extra)) ")") - "") - ))) - (g (@ (transform "scale(0.1667)")) - (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 (sxml->xml (elenq-logo "TECHNOLOGY" 1 6 3))) -(define elenq-publishing (sxml->xml (elenq-logo "PUBLISHING" 1 6 3))) - -(define args (command-line)) - -(with-exception-handler - (lambda (x) - (error (string-append "USAGE: chibi-scheme " (car args) " tech|pub"))) - (lambda () - (case (string->symbol (second args)) - ((tech) (display elenq-technology)) - ((pub) (display elenq-publishing))))) |