canvas drop shadow on text in canvas code example
Example: how to add shadow to text in canvas nodejs
const { createCanvas } = require('canvas')
const width = 400
const height = 400
const canvas = createCanvas(width, height);
var context = canvas.getContext('2d');
context.shadowColor = "black";
context.shadowBlur = 5;
context.shadowOffsetX = 3;
context.shadowOffsetY = 3;
context.font = '20px Arial'
context.fillStyle = '#fff'
context.fillText('Awesome! I did it.', width / 2 , 100)