start test 16 (GSUB ligatures)

main
Matthew Butterick 7 years ago
parent cc6f1fb148
commit 5cfd6ae98a

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(100)
.text('fifl', 100, 100, {width: false})
doc.end()
doc = new PDFDocument({compress: no})
doc.pipe(fs.createWriteStream('test16.pdf'))
make doc

Binary file not shown.

@ -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)
Loading…
Cancel
Save