summaryrefslogtreecommitdiff
path: root/utils/cover
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2020-10-03 22:33:37 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2020-10-03 22:33:37 +0200
commitb3bb20cd17013ea2f93a275a2004ec3e1ea5f52c (patch)
tree8208a4a77470e0596947f90ab44a3c2de4d1a287 /utils/cover
parent82d4afd96effbb46edd115b77575b5e8df0510da (diff)
Printed
Diffstat (limited to 'utils/cover')
-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))