Merging this separately so the commit with the tooling change is readable. This is a follow-on to #1167 which turned prettier on.
25 lines
466 B
JavaScript
25 lines
466 B
JavaScript
'use strict'
|
|
|
|
const path = require('path')
|
|
const { PDFKitTextMeasurer } = require('./text-measurer')
|
|
const { makeMakeBadgeFn } = require('./make-badge')
|
|
|
|
module.exports = {
|
|
font: {
|
|
path: path.join(
|
|
__dirname,
|
|
'..',
|
|
'node_modules',
|
|
'dejavu-fonts-ttf',
|
|
'ttf',
|
|
'DejaVuSans.ttf'
|
|
),
|
|
},
|
|
measurer() {
|
|
return new PDFKitTextMeasurer(this.font.path)
|
|
},
|
|
makeBadge() {
|
|
return makeMakeBadgeFn(this.measurer())
|
|
},
|
|
}
|