Skip to content
New issue

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

UTF-8 support #4

Open
mits87 opened this issue Jul 17, 2021 · 1 comment
Open

UTF-8 support #4

mits87 opened this issue Jul 17, 2021 · 1 comment

Comments

@mits87
Copy link

mits87 commented Jul 17, 2021

Hi,

I'm trying to use your example to generate a PDF using pdfkit and everything looks really great but right now I have a problem with UTF-8 chars (for ex. żąśćółàç). Instead of correct charset I have a missing one.

Do you have any solution for that?

Best

@omerts
Copy link

omerts commented Oct 21, 2021

@mits87 You can load a custom font to solve it, see here: https://pdfkit.org/docs/text.html
For example, instead of using helvetica, I use Cardo:
doc.font(path.join(__dirname, './assets/Cardo/Cardo-Regular.ttf'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants