From 2c100ae2b2eb7dcabc2abc0963c8ae72a04322d3 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 23 Jul 2020 20:11:32 +0200 Subject: Massive rework on makefiles and cover generator: - New style in cover - Support for call from main Makefile - Reorder directory structure --- utils/cover/barcode.scm | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'utils/cover/barcode.scm') diff --git a/utils/cover/barcode.scm b/utils/cover/barcode.scm index 85f28c2..b016e27 100644 --- a/utils/cover/barcode.scm +++ b/utils/cover/barcode.scm @@ -86,7 +86,8 @@ (number->string height))) (encoded (barcode code))) `(g - (@ (transform ,(string-append "translate(" (number->string x) "," (number->string y) ")" + (@ (transform ,(string-append "translate(" (number->string x) "," + (number->string y) ")" "scale(" (number->string scale) ")"))) ,(map @@ -105,14 +106,17 @@ ,(map (lambda (char pos) - `(text (@ (style ,(string-append "font-size: " (number->string text-size) ";" - "text-anchor: middle")) - (x ,(cond ((= 0 pos) (* 3.5 colwidth)) - ((<= 1 pos 6) (+ border (* (+ 3 (* (- pos 0.5) 7)) colwidth))) - ((< 6 pos) (+ border (* (+ 3 5 (* (- pos 0.5) 7)) colwidth))))) - (y ,height)) - ,(list->string (list char)))) + `(text + (@ (style ,(string-append "font-size: " + (number->string text-size) ";" + "text-anchor: middle")) + (x ,(cond + ((= 0 pos) (* 3.5 colwidth)) + ((<= 1 pos 6) (+ border (* (+ 3 (* (- pos 0.5) 7)) + colwidth))) + ((< 6 pos) (+ border (* (+ 3 5 (* (- pos 0.5) 7)) + colwidth))))) + (y ,height)) + ,(list->string (list char)))) (string->list code) (iota (string-length code)))))) - -#;(display (barcode-svg "9780201379624")) -- cgit v1.2.3