From 3d1ed8d28095a95069a756002a7cdd9b605af9ff Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 8 Mar 2019 12:30:38 -0800 Subject: [PATCH] no peeking --- fontland/fontland/table/cff/cff-font.rkt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fontland/fontland/table/cff/cff-font.rkt b/fontland/fontland/table/cff/cff-font.rkt index 56a10450..2a8ca209 100644 --- a/fontland/fontland/table/cff/cff-font.rkt +++ b/fontland/fontland/table/cff/cff-font.rkt @@ -17,7 +17,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFFont.js (super-new) (augride [@decode decode]) - (define (@decode stream parent) + (define (@decode stream parent _) (define cff-font (make-hasheq)) (hash-set! cff-font 'stream stream) @@ -52,7 +52,8 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFFont.js (define (getCharString cff-font glyph-id) (define glyph-record (list-ref (hash-ref (hash-ref cff-font 'topDict) 'CharStrings) glyph-id)) - (peek-bytes (hash-ref glyph-record 'length) (hash-ref glyph-record 'offset) (hash-ref cff-font 'stream))) + (pos (hash-ref cff-font 'stream) (hash-ref glyph-record 'offset)) + (read-bytes (hash-ref glyph-record 'length) (hash-ref cff-font 'stream))) (module+ test