imgkit
imgkit copied to clipboard
Fail to support UTF-8 text (Chinese Characters)?
It seems that it cannot render Chinese characters or emoji. Please fix it or provide the instructions to recover it!
Same issue here, do you solve it?
Did you solve this?
Hi, man. As i did. I try to send a 'ttf' file into /usr/share/fonts, and it works.
I solved this issue in two steps.
- As Atrbear mentioned, put a Chinese font into /usr/share/fonts.
- Use the options parameter to specify the encoding as UTF-8. Ex. imgkit.from_file(htmlfilename, 'imgkit.jpg', options={'encoding': 'UTF-8'})