summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/cover/cover.scm10
1 files changed, 8 insertions, 2 deletions
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))