3
votes

I am working on Multilingual pdf generation. I am using tcpdf version 5.9.20, and font helvetica and it's working fine for English character, but displaying ???????? for Japanese character.

I also tried arialunicid0 font as suggested here http://community.impresscms.org/modules/newbb/viewtopic.php?post_id=43480 . However, it is forcing users to download lang-package.

2

2 Answers

8
votes

Try font "cid0jp", it can probably solve your problem.

I succeed in displaying Japanese and Chinese characters by using this font. It can be found in tfpdf's package.

3
votes

Most fonts will not work for Japanese, since it needs thousands of characters (whereas English is satisfied with a hundred or so). Developing thousands of characters is expensive, thus Japanese fonts are expensive; and storing thousands of characters takes up space, which makes Japanese fonts multimegabyte. Therefore most Japanese still usually don't use custom fonts, and rely on the preinstalled fonts that come with the OS (or in one of OS-supported packages). Being a graphics designer is kind of expensive in Japan. Those that intend their documents for digital distribution (HTML, PDF) simply do not use any custom fonts.