test 17 passes

main
Matthew Butterick 7 years ago
parent 9974acaff1
commit effc6647c8

Binary file not shown.

@ -0,0 +1,20 @@
PDFDocument = require 'pdfkit'
fs = require 'fs'
make = (doc) ->
# Register a font name for use later
doc.registerFont('the-font', 'assets/fira.ttf')
# Set the font, draw some text
doc.font('the-font')
.fontSize(50)
.text('The fifth rifle', 100, 100, {width: false})
doc.end()
doc = new PDFDocument({compress: no})
doc.pipe(fs.createWriteStream('test17.pdf'))
make doc

Binary file not shown.

@ -0,0 +1,22 @@
#lang pitfall/pdftest
;; test ligatures (multiple ligs in a line)
(define-runtime-path ttf-path "assets/fira.ttf")
(define (proc doc)
;; Register a font name for use later
(send doc registerFont "the-font" (path->string ttf-path))
;; Set the font, draw some text
(send* doc
[font "the-font"]
[fontSize 50]
[text "The fifth rifle" 100 100 (hash 'width #f)]))
(define-runtime-path this "test17rkt.pdf")
(make-doc this #f proc #:test #f)
(define-runtime-path that "test17crkt.pdf")
(make-doc that #t proc #:test #f)
Loading…
Cancel
Save