summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pict.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/pict.scm b/pict.scm
index 916d527..34dfe84 100644
--- a/pict.scm
+++ b/pict.scm
@@ -794,13 +794,16 @@ filled with black."
;; U+2588 and then align the text.
(define* (text txt #:key
(color "black")
+ (border-color "none")
+ (border-width 0)
(font-family "sans-serif")
(font-size 32)
(font-style 'normal)
(font-weight 'normal))
"Render the provided string TXT. The keywords COLOR (a string),
-FONT-FAMILY (a string), FONT-SIZE (an integer), FONT-STYLE (a symbol),
-and FONT-WEIGHT (also a symbol) can be used to change the appearance."
+BORDER-COLOR (a string), BORDER-WIDTH (an integer), FONT-FAMILY (a
+string), FONT-SIZE (an integer), FONT-STYLE (a symbol), and
+FONT-WEIGHT (also a symbol) can be used to change the appearance."
(define validate-weight
(or (member font-weight '(normal bold bolder lighter))
(error "font-weight must be one of: normal, bold, bolder, lighter.")))
@@ -870,6 +873,8 @@ and FONT-WEIGHT (also a symbol) can be used to change the appearance."
(define (make-text content)
`(text (@ (style ,(style-list->string
`(("fill" ,color)
+ ("stroke" ,border-color)
+ ("stroke-width" ,(number->string border-width))
("font-family" ,font-family)
("font-style" ,(symbol->string font-style)))))
(font-size ,font-size)