summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pict.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/pict.scm b/pict.scm
index 7ea2905..916d527 100644
--- a/pict.scm
+++ b/pict.scm
@@ -801,6 +801,12 @@ filled with black."
"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."
+ (define validate-weight
+ (or (member font-weight '(normal bold bolder lighter))
+ (error "font-weight must be one of: normal, bold, bolder, lighter.")))
+ (define validate-style
+ (or (member font-style '(normal italic oblique))
+ (error "font-style must be one of: normal, italic, oblique.")))
;; Return ascent, descent, height, max_x_advance, max_y_advance
(define (font-extents)
(call-with-values