all tests work

main
Matthew Butterick 7 years ago
parent 7098897c73
commit af4fe8157d

@ -2,10 +2,7 @@
(require fontkit "subset.rkt" rackunit xenomorph racket/serialize)
(define fira-path "../pitfall/test/assets/fira.ttf")
(define f (openSync charter-path))
(define ttfs (make-object TTFSubset f))
(send ttfs encodeStream)
#;(define gpos (· f GPOS))
#;(get (· gpos lookupList) 7)
(define f (openSync fira-path))
(define gpos (· f GPOS))
(get (· gpos lookupList) 11)

@ -76,7 +76,8 @@ https://github.com/mbutterick/fontkit/blob/master/src/subset/TTFSubset.js
(when (and glyf (negative? (· glyf numberOfContours)))
(for ([component (in-list (· glyf components))])
(define gid (send this includeGlyph (· component glyphID)))
(bytes-copy! buffer (pos component) (send uint16be encode #f gid))))
;; note: this (· component pos) is correct. It's a field of a Component object, not a port
(bytes-copy! buffer (· component pos) (send uint16be encode #f gid))))
;; skip variation shit

Loading…
Cancel
Save