betterfountain
betterfountain copied to clipboard
Add full support for UTF-8 characters
I can’t export Japanese text to PDF, even though it shows up fine in the preview.
While editing:
After exporting:
I believe that's a font issue, because Courier Prime doesn't include those characters - definitely something that I'm going to look at fixing though.
In the meantime though, the good news is that it should hopefully work if you change the font (with the Font:
title page key)
@piersdeseilligny Thanks. My suggestion for the full fix would be to implement something similar to CSS’s font-family
, where fallback fonts can be specified in a comma-separated list in the Font:
key. I.e. use the first font for everything if possible, but for any glyph that is missing, try rendering it in the next font in the stack, and repeat that process if necessary.
@hguiney What font are you using for editing (I mean, the vscode font itself)?
@piersdeseilligny Thanks. My suggestion for the full fix would be to implement something similar to CSS’s
font-family
, where fallback fonts can be specified in a comma-separated list in theFont:
key. I.e. use the first font for everything if possible, but for any glyph that is missing, try rendering it in the next font in the stack, and repeat that process if necessary.
So unfortunately pdfkit doesn't support that (see https://github.com/foliojs/pdfkit/issues/201) even though it really should. However @at-guedesnt is working on merging a bunch of courier-type fonts, so that'll hopefully fix the issue :)
@piersdeseilligny Thanks. My suggestion for the full fix would be to implement something similar to CSS’s
font-family
, where fallback fonts can be specified in a comma-separated list in theFont:
key. I.e. use the first font for everything if possible, but for any glyph that is missing, try rendering it in the next font in the stack, and repeat that process if necessary.So unfortunately pdfkit doesn't support that (see foliojs/pdfkit#201) even though it really should. However @at-guedesnt is working on merging a bunch of courier-type fonts, so that'll hopefully fix the issue :)
Sure! Please check the Courier Plus project :)