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

Fail to support UTF-8 text (Chinese Characters)? #74

Open
XieGuochao opened this issue Jun 18, 2021 · 4 comments
Open

Fail to support UTF-8 text (Chinese Characters)? #74

XieGuochao opened this issue Jun 18, 2021 · 4 comments
Assignees
Labels

Comments

@XieGuochao
Copy link

It seems that it cannot render Chinese characters or emoji. Please fix it or provide the instructions to recover it!

@Butterflyer043
Copy link

Same issue here, do you solve it?

@mynameisguy
Copy link

Did you solve this?

@Atrbear
Copy link

Atrbear commented May 15, 2022

Hi, man. As i did.
I try to send a 'ttf' file into /usr/share/fonts, and it works.

@lip99-TW
Copy link

I solved this issue in two steps.

  1. As Atrbear mentioned, put a Chinese font into /usr/share/fonts.
  2. Use the options parameter to specify the encoding as UTF-8.
    Ex.
    imgkit.from_file(htmlfilename, 'imgkit.jpg', options={'encoding': 'UTF-8'})

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

No branches or pull requests

6 participants