Spaces in Chinese
achafer opened this issue · comments
ache commented
Hi, I found that when there are spaces in Chinese paragraphs, The final output style is not what I want
pdf := gofpdf.New("P", "mm", "A4", "")
pdf.AddUTF8Font("notosanssc", "", "../webfonts/NotoSansSC-Regular.ttf")
pdf.AddPage()
pdf.SetFont("notosanssc", "", 16)
str := "gofpdf支持UTF-8 TrueType字体和“right-to-left”语言。" +
"请注意,许多通用字体中可能不包含中文、日文和 韩文字符。对于这些语言," +
"可以使用专门的字体(例如,NotoSansSC 简体中文的字体)。"
pdf.MultiCell(0, 16, str, "", "L", false)
if err := pdf.OutputFileAndClose("hello.pdf"); err != nil {
log.Fatal(err)
}
Output:
Kurt Jung commented
Thanks for the report, @achafer. Any insights, @DarkFreedman?
ArtemKor commented