elliotblackburn / mdpdf

Markdown to PDF command line app with support for stylesheets
https://npmjs.com/package/mdpdf
Apache License 2.0
717 stars 47 forks source link

UTF-8 chars #110

Closed K0F closed 2 years ago

K0F commented 2 years ago

Hi, I am not sure if it is typeface problem (?) or somewhat deeper one, but some of Czech letters, to name "ěď" are not rendered at all in resulting PDF (all the settings are default).. an encoding seems to be right in the source document. Thanks for any clue.

elliotblackburn commented 2 years ago

Hi @K0F, we use Shdowdownjs under the hood for markdown -> html before then rendering the html as a PDF via puppeteer. From what I can see Showdownjs handles it just fine and I can't imagine Chrome (Puppeteer) is having an issue so I'd suggest it's probably the default typeface. You can change that through the CSS though, maybe try changing that to some kind of system default that you know will support extended character sets like Czech?

K0F commented 2 years ago

Ok thanks, I have suspected it.. it is often the case, I'll try it and let you know. Bests

K0F commented 2 years ago

Confirmed, changing typeface did the trick, thanks @BlueHatbRit for your kind support.

elliotblackburn commented 2 years ago

Glad to hear it, by any chance would you mind sharing what typeface you switched to if it's similar to our default? It might be worth me updating the readme for people who run into this in the future. No problem if you went for something totally different.

K0F commented 2 years ago

I used Droid Serif.. I believe it has an open licence

K0F commented 2 years ago

TeX Gyre fonts are working as well

elliotblackburn commented 2 years ago

Thanks for getting back to me on this, I'll see about getting something in the readme about those!