You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/ptest/minion.coffee

10 lines
309 B
CoffeeScript

7 years ago
PDFDocument = require 'pdfkit'
fs = require 'fs'
doc = new PDFDocument({compress: no})
doc.pipe(fs.createWriteStream('minion-test.pdf'))
doc.registerFont('the-font', '/Library/Fonts/MinionPro-Regular.OTF')
doc.font('the-font')
.fontSize(25)
.text('Minion Pro Regular OTF', 50, 50, {width: false})
doc.end()