diff options
-rw-r--r-- | pict.scm | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |