diff --git a/fontland/fontland/table-stream.rkt b/fontland/fontland/table-stream.rkt index 004c5f20..f4092c89 100644 --- a/fontland/fontland/table-stream.rkt +++ b/fontland/fontland/table-stream.rkt @@ -37,10 +37,9 @@ (define table (hash-ref (hash-ref directory 'tables) tag)) (and table (pos (ttf-font-port this) (hash-ref table 'offset)) - (let ([maybe-woff-compLength (hash-ref table 'compLength #f)]) - (if (and maybe-woff-compLength (< maybe-woff-compLength (hash-ref table 'length))) - (open-input-bytes (inflate (peek-bytes maybe-woff-compLength 0 (ttf-font-port this)))) - (ttf-font-port this))))) + (if (and (woff-font? this) (< (hash-ref table 'compLength) (hash-ref table 'length))) + (open-input-bytes (inflate (peek-bytes (hash-ref table 'compLength) 0 (ttf-font-port this)))) + (ttf-font-port this)))) (define (decode-table this table-tag) (unless (hash-has-key? table-codecs table-tag)