diff --git a/pitfall/pitfall/test/out.bin b/pitfall/pitfall/test/out.bin index 82c6a1c3..c240bdf4 100644 Binary files a/pitfall/pitfall/test/out.bin and b/pitfall/pitfall/test/out.bin differ diff --git a/pitfall/pitfall/test/test15crkt.pdf b/pitfall/pitfall/test/test15crkt.pdf index 325efa8b..1c8baef9 100644 Binary files a/pitfall/pitfall/test/test15crkt.pdf and b/pitfall/pitfall/test/test15crkt.pdf differ diff --git a/pitfall/pitfall/test/test15rkt.pdf b/pitfall/pitfall/test/test15rkt.pdf index 3158c592..c9de7814 100644 Binary files a/pitfall/pitfall/test/test15rkt.pdf and b/pitfall/pitfall/test/test15rkt.pdf differ diff --git a/pitfall/pitfall/test/test16.coffee b/pitfall/pitfall/test/test16.coffee new file mode 100644 index 00000000..afe4f259 --- /dev/null +++ b/pitfall/pitfall/test/test16.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(100) + .text('fifl', 100, 100, {width: false}) + + doc.end() + + +doc = new PDFDocument({compress: no}) +doc.pipe(fs.createWriteStream('test16.pdf')) +make doc + diff --git a/pitfall/pitfall/test/test16.pdf b/pitfall/pitfall/test/test16.pdf new file mode 100644 index 00000000..263e3abb Binary files /dev/null and b/pitfall/pitfall/test/test16.pdf differ diff --git a/pitfall/pitfall/test/test16.rkt b/pitfall/pitfall/test/test16.rkt new file mode 100644 index 00000000..477a09c2 --- /dev/null +++ b/pitfall/pitfall/test/test16.rkt @@ -0,0 +1,22 @@ +#lang pitfall/pdftest + +;; test ligatures (GSUB parsing + substitution) + +(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 100] + [text "fifl" 100 100 (hash 'width #f)])) + + +(define-runtime-path this "test16rkt.pdf") +(make-doc this #f proc #:test #f) + +#;(define-runtime-path that "test16crkt.pdf") +#;(make-doc that #t proc #:pdfkit #f) \ No newline at end of file diff --git a/pitfall/pitfall/test/test16rkt.pdf b/pitfall/pitfall/test/test16rkt.pdf new file mode 100644 index 00000000..8f931191 Binary files /dev/null and b/pitfall/pitfall/test/test16rkt.pdf differ