Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
LewdHuTao committed Apr 19, 2024
1 parent b95b2ec commit 07e5c14
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 7 deletions.
54 changes: 50 additions & 4 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "songcard",
"version": "1.1.3",
"version": "1.1.4",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand All @@ -11,6 +11,7 @@
"dependencies": {
"canvas": "^2.11.2",
"jimp": "^0.22.12",
"path": "^0.12.7",
"pretty-ms": "^9.0.0"
},
"repository": {
Expand All @@ -26,6 +27,5 @@
"discord",
"music bot",
"song card"
],
"devDependencies": {}
]
}
Binary file added src/fonts/NotoSans-Regular.ttf
Binary file not shown.
4 changes: 4 additions & 0 deletions src/themes/simpleCard.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
const { createCanvas, loadImage } = require("canvas");
const Jimp = require("jimp");
const { resolve } = require("path");

async function simpleCard({ imageBg, imageText }) {
const Canvas = require("canvas");
Canvas.registerFont(resolve("./src/fonts/NotoSans-Regular.ttf"), { family: "Noto Sans" })

const canvasWidth = 600;
const canvasHeight = 600;
const canvas = createCanvas(canvasWidth, canvasHeight);
Expand Down

0 comments on commit 07e5c14

Please sign in to comment.