I am using pdfkit to dynamically generate PDF documents within a nodewebkit application. The PDFs contain people's comments coming from a remote source via an HTTP request.
It works really well, however now I spotted that when a comment is in Japanese, Chinese, Arabic, etc. it doesn't render correctly, and I have no means of knowing what language the comments will be coming in—in fact I am gathering them from around the world.
I understood that I need to use the right font that should have proper characters included, as explained here. I spotted this "google noto" open font which has it all, but the problem is that there is no single TTF file with all languages, and there can't be as font files are limited to 65K glyphs.
I am trying to find a solution that lets render text in (almost) any language within a PDF using pdfkit, without having to write a sophisticated language recognition tool, which I feel would be an overkill.
Any thoughts and suggestions will be much appreciated.
UPDATE: Use font-manager by the author of pdfkit to substitute the font. Also you may want to try phantomJS—I haven't done that though. See detailed response by @levi in the comments if you have the same problem. Hope it helps.