Skip to content

Commit

Permalink
Up packages. Switch to font loadSync. Bump to 2.6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscant committed Jan 4, 2024
1 parent 39d7cf2 commit fbf6af4
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 49 deletions.
11 changes: 3 additions & 8 deletions mkdistmaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -1045,14 +1045,9 @@ async function makeImages (rowCount) {
console.log('boxwidthSmallhalf', boxwidthSmallhalf)

// Load the font
const loadFont = new Promise((resolve, reject) => {
const fontpath = path.join(__dirname, config.font_filename)
const fnt = PImage.registerFont(fontpath, 'TheFont')
fnt.load(() => {
resolve()
})
})
await loadFont
const fontpath = path.join(__dirname, config.font_filename)
const fnt = PImage.registerFont(fontpath, 'TheFont')
fnt.loadSync()

// Go through all species
let done = 0
Expand Down
74 changes: 37 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mkdistmaps",
"version": "2.6.2",
"version": "2.6.3",
"description": "Make Distribution Maps from CSV file(s)",
"main": "mkdistmaps.js",
"scripts": {
Expand All @@ -15,16 +15,16 @@
"url": "https://github.com/chriscant/mkdistmaps.git"
},
"comments": {
"onetest": "jest -t ''GB GRID REFS #3'"
"onetest": "jest -t 'GB GRID REFS #3'"
},
"dependencies": {
"fast-csv": "4.3.6",
"filecompare": "1.0.4",
"glob": "^10.0.0",
"lodash": "4.17.21",
"moment": "^2.29.4",
"pureimage": "^0.3.14",
"rgb-hex": "3.0.0",
"pureimage": "^0.4.13",
"rgb-hex": "^3.0.0",
"seedrandom": "3.0.5",
"word-list": "3.1.0"
}
Expand Down

0 comments on commit fbf6af4

Please sign in to comment.