update otf test with patch available

main
Matthew Butterick 6 years ago
parent 6fb1344b80
commit f29388f382

Binary file not shown.

@ -6,12 +6,12 @@ fs = require 'fs'
make = (doc) ->
# Register a font name for use later
doc.registerFont('the-font', 'assets/charter.otf')
doc.registerFont('the-font', 'assets/fira.otf')
# Set the font, draw some text
doc.font('the-font')
.fontSize(40)
.text('Embedded OTF', 100, 100, {width: false})
.text('Fira OTF rifle fire', 100, 100, {width: false})
doc.end()

Binary file not shown.

@ -2,19 +2,18 @@
(require pitfall/pdftest)
;; subset OTF font
(define-runtime-path otf-path "assets/charter.otf")
(define-runtime-path otf-path "assets/fira.otf")
;; embed otf
(define (proc doc)
;; Register a font name for use later
(send doc register-font "the-font" (path->string otf-path))
(register-font doc "the-font" (path->string otf-path))
;; Set the font, draw some text
(send* doc
[font "the-font"]
[font-size 40]
[text "Embedded OTF" 100 100]))
[font doc "the-font"]
[font-size doc 40]
[text doc "Fira OTF rifle fire" 100 100])
;; test against non-subsetted font version
(define-runtime-path this "test20rkt.pdf")

Binary file not shown.
Loading…
Cancel
Save