diff --git a/quad/fontproof/command.rkt b/quad/fontproof/command.rkt index fe5648b2..36d15854 100755 --- a/quad/fontproof/command.rkt +++ b/quad/fontproof/command.rkt @@ -56,7 +56,7 @@ #:args families families)) (match families - [(? null?) (raise-user-error "No font to proof. Exiting.")] + [(? null?) (raise-user-error "no font to proof; exiting")] [_ (for ([family (in-list families)]) (make-proof family (or doc (match (current-input-port) diff --git a/quad/fontproof/main.rkt b/quad/fontproof/main.rkt index eca37f30..45c3b154 100755 --- a/quad/fontproof/main.rkt +++ b/quad/fontproof/main.rkt @@ -39,8 +39,8 @@ (define output-file-path (path-replace-extension qml-ps #".pdf")) (values doc output-file-path)] [font-name-arg - (unless sample-text - (raise-user-error "Nothing to proof. Exiting.")) + (unless (and sample-text (non-empty-string? sample-text)) + (raise-user-error "nothing to proof; exiting")) (define-values (initial-font-family initial-font-bold initial-font-italic) (let ([bi-suffix-pat #px"\\s*((?i:bold))?\\s*((?i:italic))?$"]) (match-define (list suffix bold? italic?) (regexp-match bi-suffix-pat font-name-arg)) @@ -69,8 +69,7 @@ [font-italic (in-list italic-variants)] [line-height (in-list line-heights)]) (attr-set* - (list - 'q sample-text) + (txexpr* 'q null sample-text) 'font-size font-size 'font-italic (boolean->string font-italic) 'font-bold (boolean->string font-bold)