We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The lineWidth not working for strokeText on glyph mode.
Look at this code:
const { createCanvas } = require('canvas') const fs = require('fs') const canvas = createCanvas(200, 400, 'pdf') const ctx = canvas.getContext('2d') ctx.textDrawingMode = 'glyph'; ctx.font = '30pt Helvetica' ctx.fillText('A', 50, 50) ctx.lineWidth = 20 ctx.strokeStyle = 'red'; ctx.strokeText('A', 50, 100) const PDFStream = canvas.createPDFStream() const outputFile = fs.createWriteStream('./output.pdf') PDFStream.pipe(outputFile); PDFStream.on('finish', () => { console.log('PDF file generated successfully!'); }); PDFStream.on('error', (err) => { console.error('Error generating PDF:', err); });
Output:
But path mode is work:
- ctx.textDrawingMode = 'glyph';
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The lineWidth not working for strokeText on glyph mode.
Look at this code:
Output:
But path mode is work:
- ctx.textDrawingMode = 'glyph';
The text was updated successfully, but these errors were encountered: