Open lrmunoz opened 2 years ago
@blikblum @devongovett At my company, we're interested in funding the fix for this issue, please ping me if interested: luis at finaleinventory dot com
I am facing the same issue, version 0.13.0
Hi @lrmunoz
Maybe It's font file problem.
I'm the author of pdfme, and I have the same issue at pdfme (pdfme has fontkit dependency internally)
I don't have deep knowledge about font and fonkit, but I found that If we use a big font file(Chinese, Japanese), we have to use ttf font file.
So, I checked Simplified Chinese Noto font as ttf. You can download it here
Finally, I got the correct PDF.
Link to minimal-kit fork: https://replit.com/@handdot/minimal-pdfkit-issue-1357?v=1
Thanks.
Bug Report
Description of the problem
I'm using one of the official Noto fonts for Simplified Chinese, downloaded from: https://github.com/googlefonts/noto-cjk/blob/main/Sans/OTF/SimplifiedChinese/NotoSansCJKsc-Regular.otf
When I call
PDFDocument.text
with a string that mixes English with Simplified Chinese, subsequent calls toPDFDocument.text
with English strings produced garbled text:Code sample
Link to minimal-kit fork: https://replit.com/@lrmunoz/minimal-pdfkit-issue-1357
Code:
Your environment