Try to render fonts on canvas correctly
See https://github.com/mozilla/pdf.js/issues/7929.
Embedded fonts could not be rendered through node-canvas.
Now Canvas has https://github.com/Automattic/node-canvas#registerfont-for-bundled-fonts. Try to use a pdf.js hook to register a font with Canvas and render it.
If this is implemented PDFJS.disableFontFace=true; can be set to false.
Do you have any plans to implement this or can give any directions where to begin to look? Or how did you generally plan to make this work?
If you could take a look at https://github.com/mozilla/pdf.js/issues/7929#issuecomment-376509569 (and comments below) I would appreciate it.
@swftvsn Not sure how to approach this. This issue is not (yet) a priority for us, because we are fine with rendering fonts as images. It is not a priority for us right now, but to point you in a direction: I'm pretty sure you need the fonts installed on the machine running nodejs.
Looking at your Pango warning that may not be the case in your setup (just a guess):
(process:36223): Pango-WARNING **: 15:46:36.286: couldn't load font
"ABBVIT+Impact,monospace Condensed Not-Rotated 16px", modified
variant/weight/stretch as fallback, expect ugly output.
It's something I missed the last time trying.
Still, if you render the node-canvas as image (png/jpg) it may be enough to set disableFontFace=true and skip rendering fonts all together.
@Hikariii Yep, we're running with disableFontFace=true but unfortunately a lot of PDFs fail to render for us, and we can't skip those.. We're hitting this issue: https://github.com/mozilla/pdf.js/issues/4244