main
Matthew Butterick 6 years ago
parent 076b9f13cd
commit 936ec1ad78

@ -16,7 +16,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/tables/head.js
(define hfs-seconds (x:int #:size 8
#:signed #f
#:endian 'be
#:post-decode (λ (int) (seconds->date (- int mac-to-posix-delta)))
#:post-decode (λ (int) (seconds->date (- int mac-to-posix-delta) #f))
#:pre-encode (λ (dt) (+ (date->seconds dt) mac-to-posix-delta))))
(define head (x:struct

@ -57,4 +57,4 @@ https://github.com/mbutterick/fontkit/blob/master/src/tables/WOFFDirectory.js
(define name-table (decode head ip))
(check-equal? (hash-ref name-table 'magicNumber) #x5F0F3CF5)
(check-equal? (hash-ref name-table 'unitsPerEm) 1000)
(check-equal? (hash-ref name-table 'created) (date* 52 12 5 10 7 2013 3 190 #t -25200 0 "PDT")))
(check-equal? (hash-ref name-table 'created) (date* 52 12 12 10 7 2013 3 190 #f 0 0 "UTC")))
Loading…
Cancel
Save