mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-22 03:57:47 -04:00
nouns image background
This commit is contained in:
parent
3aa4df202e
commit
987e1b3358
@ -152,9 +152,8 @@ router.get('/nouns/:word.png', async (req, res) => {
|
||||
const canvas = createCanvas(width, height);
|
||||
const context = canvas.getContext('2d');
|
||||
|
||||
context.fillStyle = '#fff';
|
||||
context.fillRect(0, 0, width, height);
|
||||
context.fillStyle = '#000';
|
||||
const bg = await loadImage('static/bg.png');
|
||||
context.drawImage(bg, 0, 0, width, height);
|
||||
|
||||
context.font = 'bold 64pt Quicksand';
|
||||
context.fillText(base, width / 2 - context.measureText(base).width / 2, 120);
|
||||
|
BIN
static/bg.png
Normal file
BIN
static/bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Loading…
x
Reference in New Issue
Block a user