diff --git a/pitfall/pitfall/test/out.bin b/pitfall/pitfall/test/out.bin index 809e6044..2870701f 100644 Binary files a/pitfall/pitfall/test/out.bin and b/pitfall/pitfall/test/out.bin differ diff --git a/pitfall/pitfall/test/test17.coffee b/pitfall/pitfall/test/test17.coffee new file mode 100644 index 00000000..afdecfd7 --- /dev/null +++ b/pitfall/pitfall/test/test17.coffee @@ -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 + diff --git a/pitfall/pitfall/test/test17.pdf b/pitfall/pitfall/test/test17.pdf new file mode 100644 index 00000000..625bafc8 Binary files /dev/null and b/pitfall/pitfall/test/test17.pdf differ diff --git a/pitfall/pitfall/test/test17.rkt b/pitfall/pitfall/test/test17.rkt new file mode 100644 index 00000000..95055b40 --- /dev/null +++ b/pitfall/pitfall/test/test17.rkt @@ -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) \ No newline at end of file diff --git a/pitfall/pitfall/test/test17crkt.pdf b/pitfall/pitfall/test/test17crkt.pdf new file mode 100644 index 00000000..d947ea19 Binary files /dev/null and b/pitfall/pitfall/test/test17crkt.pdf differ diff --git a/pitfall/pitfall/test/test17rkt.pdf b/pitfall/pitfall/test/test17rkt.pdf new file mode 100644 index 00000000..992de21a Binary files /dev/null and b/pitfall/pitfall/test/test17rkt.pdf differ