From af9bde6aa9fc557a48440bf210e95a268f4b7c3f Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 12 Feb 2020 17:28:23 -0800 Subject: [PATCH] allow false arg --- pitfall/pitfall/text.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pitfall/pitfall/text.rkt b/pitfall/pitfall/text.rkt index b6b3edb6..8c679c8f 100644 --- a/pitfall/pitfall/text.rkt +++ b/pitfall/pitfall/text.rkt @@ -179,6 +179,6 @@ https://github.com/mbutterick/pdfkit/blob/master/lib/mixins/text.coffee (define (string-width doc str #:tracking [character-tracking 0] - #:features [features (pdf-current-font-features doc)]) - (+ (measure-string (pdf-current-font doc) str (pdf-current-font-size doc) features) + #:features [features #false]) + (+ (measure-string (pdf-current-font doc) str (pdf-current-font-size doc) (or features (pdf-current-font-features doc))) (* character-tracking (sub1 (string-length str)))))