const fontPath = path.join(__dirname, 'fonts', 'pgmus.ttf');
// Stream font file fs.createReadStream(fontPath).pipe(res); } catch (error) { console.error(error); res.status(500).send('Error downloading font'); } }); pgmus.ttf font download
app.get('/download-font', (req, res) => { try { // Check if font file exists if (!fs.existsSync(fontPath)) { throw new Error('Font file not found'); } const fontPath = path