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
12
Canvas throws Error: Could not parse font file for a font with em size 12, but works on the same font with em size 24.
Error: Could not parse font file
24
The only difference between these two fonts are that the outlines have been scaled to twice their original size.
import path from 'path'; import { registerFont } from 'canvas'; const fontFile = (fileName: string) => path.join(__dirname, 'fonts/', fileName); registerFont(fontFile('24-em-font.otf'), { family: 'Minecraft' }); registerFont(fontFile('12-em-font.otf'), { family: 'Minecraft' });
2.10.2
v18.20.4
Windows 10 (22H2)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue or Feature
Canvas throws
Error: Could not parse font file
for a font with em size12
, but works on the same font with em size24
.The only difference between these two fonts are that the outlines have been scaled to twice their original size.
Steps to Reproduce
Your Environment
2.10.2
v18.20.4
onWindows 10 (22H2)
The text was updated successfully, but these errors were encountered: