set version key explicitly

main
Matthew Butterick 6 years ago
parent 10f7c6d22a
commit 878c2724c7

@ -23,9 +23,6 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFFont.js
(for ([(k v) (in-hash (decode CFFTop stream))])
(hash-set! cff-font k v))
;; because fontkit depends on overloading 'version key, and we don't
(hash-set! cff-font 'version (hash-ref cff-font 'x:version))
(when (and (hash-has-key? cff-font 'version) (< (hash-ref cff-font 'version) 2))
(match (hash-ref cff-font 'topDictIndex)

@ -120,9 +120,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFTop.js
(define FDSelect
(x:versioned-struct
uint8
#:pre-encode
;; because fontkit depends on overloading 'version key, and we don't
(λ (val) (dict-set val 'x:version (dict-ref val 'version)))
#:version-key 'version
(dictify
0 (dictify 'fds (x:array uint8 base-tproc))
3 (dictify 'nRanges uint16be
@ -205,9 +203,7 @@ https://github.com/mbutterick/fontkit/blob/master/src/cff/CFFTop.js
(define CFFTop
(x:versioned-struct
#:pre-encode
;; because fontkit depends on overloading 'version key, and we don't
(λ (val) (hash-set! val 'x:version (hash-ref val 'version)) val)
#:version-key 'version
fixed16be
(dictify
1 (dictify 'hdrSize uint8

Loading…
Cancel
Save