yWorks/svg2pdf.js

Chinese is not supported

hhly opened this issue · 2 comments

hhly commented

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
See this playground.

Expected behavior
I would have expected the PDF to look like so.
This is in accordance to the following SVG spec.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

hhly commented

image

I added fonts, but Chinese is still garbled
yGuy commented

Works for me

image

The playground doesn't have a font with chinese characters loaded, but your SVG failed to specify the font name, anyway. You need to specify the font name in the SVG, too.