summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------src/Programming_in_Python0
m---------src/What_is_Informatics0
-rw-r--r--utils/cover/cover.scm10
3 files changed, 8 insertions, 2 deletions
diff --git a/src/Programming_in_Python b/src/Programming_in_Python
-Subproject 7a30d572b687760a05f4e700b6a5e1515e6aa5c
+Subproject fa04131f8eea0a57bab493a8f34f0937501ed82
diff --git a/src/What_is_Informatics b/src/What_is_Informatics
-Subproject 7244295084ed9589befb95091d11bb6dd46757f
+Subproject 8658f13ce3d1031baa332fb8aaa1a33776a89e6
diff --git a/utils/cover/cover.scm b/utils/cover/cover.scm
index 8fea57c..915f42a 100644
--- a/utils/cover/cover.scm
+++ b/utils/cover/cover.scm
@@ -79,6 +79,11 @@
(if (pair? val)
(vector->list (cdr val))
'())))
+(define (get-number key alist)
+ (let ((val (assoc key alist)))
+ (if (pair? val)
+ (cdr val)
+ 10)))
(define (metadata->svg metadata outport)
@@ -99,6 +104,7 @@
(book-authors (get-list 'author metadata))
(book-summary (get-string 'summary metadata))
(company-info (get-string 'company-info metadata))
+ (spine-width (get-number 'spine-width metadata)) ;mm
(main-title-size
(let ((size (exact->inexact
@@ -109,7 +115,7 @@
(exact->inexact (/ page-height 5))
size))) ;mm
- (spine-width 10) ;mm TODO
+
(spine-title-margin-min (* 0.1 spine-width))
(spine-title-max-size 10)
(spine-title-size
@@ -121,7 +127,7 @@
(text-size (exact->inexact (/ page-height 70))); mm
(category-size (* 1.5 text-size)); mm
- (authors-size (* 1.8 text-size))
+ (authors-size (* 1.8 text-size)); mm
(title-size (* 2.5 text-size)); mm
(main-subtitle-size (* 2 text-size))