update otf test with patch available

main
Matthew Butterick 5 years ago
parent 6fb1344b80
commit f29388f382

Binary file not shown.

@ -6,12 +6,12 @@ fs = require 'fs'
make = (doc) -> make = (doc) ->
# Register a font name for use later # 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 # Set the font, draw some text
doc.font('the-font') doc.font('the-font')
.fontSize(40) .fontSize(40)
.text('Embedded OTF', 100, 100, {width: false}) .text('Fira OTF rifle fire', 100, 100, {width: false})
doc.end() doc.end()

Binary file not shown.

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

Binary file not shown.
Loading…
Cancel
Save