From cd3b784bd0200079d0d61a7c2b275b1be4bfa4ef Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Wed, 15 Jan 2020 14:29:35 -0800 Subject: [PATCH] default arg for character tracking --- pitfall/pitfall/text.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pitfall/pitfall/text.rkt b/pitfall/pitfall/text.rkt index 144f2a86..b6b3edb6 100644 --- a/pitfall/pitfall/text.rkt +++ b/pitfall/pitfall/text.rkt @@ -98,7 +98,7 @@ https://github.com/mbutterick/pdfkit/blob/master/lib/mixins/text.coffee #:features [features (pdf-current-font-features doc)] #:fill [fill? #t] #:stroke [stroke? #f] - #:tracking [character-tracking 0] + #:tracking [character-tracking-arg #f] #:underline [underline? #f] #:link [link-url #f] #:strike [strike? #f] @@ -110,6 +110,7 @@ https://github.com/mbutterick/pdfkit/blob/master/lib/mixins/text.coffee ;; 180109: character spacing works in pdf, but quad doesn't account for it yet + (define character-tracking (or character-tracking-arg 0)) ;; calculate the actual rendered width of the string after word and character spacing (define rendered-width ;; wrap this in delay so it's only calculated if needed