From 803dcc71c3eca7436644bd665a6333a332045df7 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 5 Mar 2019 21:27:01 -0800 Subject: [PATCH] resume in operand --- fontland/fontland/table/cff/cff-dict.rkt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fontland/fontland/table/cff/cff-dict.rkt b/fontland/fontland/table/cff/cff-dict.rkt index a93c30c0..c79030d9 100644 --- a/fontland/fontland/table/cff/cff-dict.rkt +++ b/fontland/fontland/table/cff/cff-dict.rkt @@ -51,19 +51,20 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFDict.js (cond [(< b 28) (when (= b 12) - (set! b (bitwise-or (arithmetic-shift b 8) (read-byte stream)))) + (set! b (bitwise-ior (arithmetic-shift b 8) (read-byte stream)))) (define field (hash-ref @fields b #false)) (unless field (error 'cff-dict-decode (format "unknown operator: ~a" b))) (define val (decodeOperands (third field) stream ret operands)) - (when val - (if (PropertyDescriptor? val) - - (loop))) - - ) + (unless (void? val) + ;; ignoring PropertyDescriptor nonsense + (hash-set! ret (second field) val)) + (set! operands null)] + [else + (set! operands (append operands (list (decode CFFOperand stream b))))]) + (loop)))) (define/augment (size dict parent [includePointers #true]) (error 'cff-dict-size-undefined))