allow 'true' at start of TTF

svn: r1608
This commit is contained in:
Matthew Flatt 2005-12-13 11:57:55 +00:00
parent 7944f69e85
commit 5fa19d556c

View File

@ -20,8 +20,10 @@
(define (parse-ttf p)
(begin-with-definitions
(unless (= (read-fixed p) #x10000)
(error "Doesn't start with snft version 1.0"))
(let ([v (read-fixed p)])
(unless (or (= v #x10000)
(= v (integer-bytes->integer #"true" #f #t)))
(error "Doesn't start with snft version #x10000 or 'true'; got #x~x" v)))
(define num-tables (read-short p))
(read-short p)