From 2ad1f7466199d8ee49d05adffebec810e73295c7 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 15 Mar 2019 11:04:48 -0700 Subject: [PATCH] how to use a vector --- fontland/fontland/subset.rkt | 2 +- fontland/fontland/table/cff/cff-private-dict.rkt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fontland/fontland/subset.rkt b/fontland/fontland/subset.rkt index 97468021..cf6c974d 100644 --- a/fontland/fontland/subset.rkt +++ b/fontland/fontland/subset.rkt @@ -100,7 +100,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/subset/CFFSubset.js gsubrs))) (define (subsetSubrs this subrs used) - (for/list ([(subr i) (in-indexed subrs)]) + (for/vector ([(subr i) (in-indexed subrs)]) (cond [(hash-ref used i #false) (pos (hash-ref (cff-subset-cff this) 'stream) (hash-ref subr 'offset)) diff --git a/fontland/fontland/table/cff/cff-private-dict.rkt b/fontland/fontland/table/cff/cff-private-dict.rkt index 134b4a92..c2ce3893 100644 --- a/fontland/fontland/table/cff/cff-private-dict.rkt +++ b/fontland/fontland/table/cff/cff-private-dict.rkt @@ -44,5 +44,4 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFPrivateDict.js (21 nominalWidthX number 0) (22 vsindex number 0) (23 blend ,CFFBlendOp #false) - (19 Subrs ,(CFFPointer (CFFIndex) #:relative-to 'local) ,null)))) -;; todo: why can't the subrs default value be `(vector)`? \ No newline at end of file + (19 Subrs ,(CFFPointer (CFFIndex) #:relative-to 'local) ,(vector))))) \ No newline at end of file