diff --git a/fontland/fontland/table/cff/cff-dict.rkt b/fontland/fontland/table/cff/cff-dict.rkt index b1e25e8c..a1067c99 100644 --- a/fontland/fontland/table/cff/cff-dict.rkt +++ b/fontland/fontland/table/cff/cff-dict.rkt @@ -130,8 +130,8 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFDict.js (hash-set! ctx x:pointer-offset-key (+ (pos stream) (@size dict ctx #false))) (for ([field (in-list @ops)]) - #R (pos stream) - #R field + #;(pos stream) + #;field (define val (dict-ref dict (list-ref field 1) #false)) (cond [(or (not val) (equal? val (list-ref field 3)))] diff --git a/fontland/fontland/table/cff/cff-operand.rkt b/fontland/fontland/table/cff/cff-operand.rkt index 1fa775e0..7a68a571 100644 --- a/fontland/fontland/table/cff/cff-operand.rkt +++ b/fontland/fontland/table/cff/cff-operand.rkt @@ -95,15 +95,16 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFOperand.js (define c2 (vector-ref str (add1 i))) (set! n2 (hash-ref FLOAT_ENCODE_LOOKUP c2 (string->number c2)))]) - (encode uint8 (bitwise-ior (arithmetic-shift n1 -4) (bitwise-and n2 15)) stream)) + (encode uint8 (bitwise-ior (arithmetic-shift n1 4) (bitwise-and n2 15)) stream)) (unless (= n2 FLOAT_EOF) (encode uint8 (arithmetic-shift FLOAT_EOF 4) stream))] [(<= -107 value 107) (encode uint8 (+ val 139) stream)] [(<= 108 value 1131) + (let ([val (- val 108)]) (encode uint8 (+ (arithmetic-shift val -8) 247) stream) - (encode uint8 (bitwise-and val #xff) stream)] + (encode uint8 (bitwise-and val #xff) stream))] [(<= -1131 value -108) (let ([val (- (- val) 108)]) (encode uint8 (+ (arithmetic-shift val -8) 251) stream)