diff --git a/pitfall/fontkit/directory.rkt b/pitfall/fontkit/directory.rkt index d12e0102..8db39fb2 100644 --- a/pitfall/fontkit/directory.rkt +++ b/pitfall/fontkit/directory.rkt @@ -22,7 +22,6 @@ https://github.com/mbutterick/fontkit/blob/master/src/tables/directory.js (hash-set! this-res 'tables new-tables-val)) (define/override (preEncode this-val stream) - (define tables empty) (for ([(tag table) (in-hash (· this-val tables))]) (when table diff --git a/pitfall/fontkit/glyf.rkt b/pitfall/fontkit/glyf.rkt index ca5266b2..fe2b9ad8 100644 --- a/pitfall/fontkit/glyf.rkt +++ b/pitfall/fontkit/glyf.rkt @@ -20,4 +20,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/tables/glyf.js (set-port-position! ip 0) (define table-bytes (peek-bytes len offset ip)) (define ds (+DecodeStream table-bytes)) + (define es (+EncodeStream)) + (send glyf encode es empty) + #;(send es dump) ) diff --git a/pitfall/fontkit/subset.rkt b/pitfall/fontkit/subset.rkt index ead3c243..c9b51d11 100644 --- a/pitfall/fontkit/subset.rkt +++ b/pitfall/fontkit/subset.rkt @@ -97,7 +97,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/subset/TTFSubset.js 'fpgm (send (· this font) _getTable 'fpgm) ))) - (report* stream (send stream dump)) + (report* (send stream dump)) (unfinished) ) diff --git a/pitfall/restructure/buffer.rkt b/pitfall/restructure/buffer.rkt index 70100dc9..23742cb1 100644 --- a/pitfall/restructure/buffer.rkt +++ b/pitfall/restructure/buffer.rkt @@ -7,7 +7,7 @@ approximates https://github.com/mbutterick/restructure/blob/master/src/Buffer.coffee |# -(define-subclass RestructureBase (Buffer [_length #f]) +(define-subclass RestructureBase (Buffer [_length #xffff]) (define/override (decode stream [parent #f]) (define len (resolveLength _length stream parent)) (send stream readBuffer len))