test 12 works

main
Matthew Butterick 7 years ago
parent ecec3c9479
commit 7098897c73

@ -14,10 +14,10 @@ https://github.com/devongovett/fontkit/blob/master/src/subset/Subset.js
(send this includeGlyph 0) ; always include the missing glyph in subset
(define/public (encodeStream)
(define s (open-output-bytes))
(send this encode s)
s)
(define/public (encode-to-port)
(define p (open-output-bytes))
(encode this p)
p)
(as-methods
includeGlyph))

@ -78,9 +78,10 @@ https://github.com/mbutterick/pdfkit/blob/master/lib/font/embedded.coffee
(when isCFF
(hash-set! (· fontFile payload) 'Subtype "CIDFontType0C"))
(report* (· this subset))
(send fontFile end (send (send (· this subset) encodeStream) dump))
;; todo: address spooky behavior
;; `(send p dump)` throws an exn:fail:object, but it gets swallowed by an intervening · operator
(define p (send (· this subset) encode-to-port))
(send fontFile end (get-output-bytes p))
(define familyClass (let ([val (if (send (· this font) has-table? 'OS/2)
(· this font OS/2 sFamilyClass)

@ -24,7 +24,7 @@
(define/contract (finalize this)
(->m void?)
(unless (or (· this embedded) (not (· this dictionary)))
(· this embed)
(send this embed)
(set-field! embedded this #t)))

@ -17,5 +17,5 @@
(define-runtime-path this "test12rkt.pdf")
(make-doc this #f proc)
#;(define-runtime-path that "test12crkt.pdf")
#;(make-doc that #t proc #:pdfkit #f)
(define-runtime-path that "test12crkt.pdf")
(make-doc that #t proc #:pdfkit #f)
Loading…
Cancel
Save