Problem/Motivation
Unifont fonts are not nice for japanese PDF generation.
Proposed resolution
I'd like to recommend alternative fonts for PDF file generation.
Takao Fonts( https://launchpad.net/takao-fonts ) are free open source fonts that are used in Ubuntu japanese distribution.
Those fonts are clear and the installation is easy because those have Debian package.
Package name is "fonts-takao", please try one of the following:
apt-get install fonts-takao
yum install fonts-takao
I like proportional font "TakaoPGothic" because it is more readable, but any font is OK.
Attach:
unifont.png: PDF screen capture using unifont.
TakaoPGothic.png: PDF screen capture using TakaoPGothic.
Remaining tasks
We have to modify the PDF generation program and pdf xsl file.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | guide-ja.pdf | 6.22 MB | jhodgdon |
| #10 | Takao_baseline.png | 14.58 KB | kabetani |
| #10 | BabelStoneHan_baseline.png | 26.32 KB | kabetani |
| #7 | guide-ja.pdf | 6.2 MB | jhodgdon |
| TakaoPGothic.png | 32.99 KB | kabetani |
Comments
Comment #2
jhodgdonGreat! I was wondering which font would be good for Japanese. I used Unifont because at least, though ugly, it had all the characters -- we needed a font that has both Japanese and Latin characters... It looks like that Takao font is a good one. See also #2887136-10: Font problems building PDF files for some languages.
Anyway, I will test it out and update the scripts. Thanks!
Comment #3
Tomotsugu Kaneko commentedI'd recommend [adobe-fonts/source-han-sans: Source Han Sans | 思源黑体 | 思源黑體 | 源ノ角ゴシック | 본고딕](https://github.com/adobe-fonts/source-han-sans)
Comment #4
kabetani commented"Source Han Sans" is good because it covers Chinene,Korean,Japanese language, but it only has OpenType fonts.
In case of using that font, we have to convert that to a TrueType font.
Please see https://www.drupal.org/node/2887064#comment-12138393 .
Comment #5
jhodgdonWe were conversing with the developer of the PDF processor we are using on another issue (in the Apache project), and he said OpenType fonts should work. So, I will test out this font. It's possible that the other OpenType font I was trying to use had some other problem.
And we may be switching to a different method for making PDFs anyway, due to problems with Farsi (a right-to-left language).
I will probably not have time to test this out for a week or two, sorry! But I will get to it as soon as I can. Thanks for the input!
Comment #6
kabetani commentedThank you for the information!
Japanese translation has just started and there is almost no committed work.
So please test it slowly when you have time.
Comment #7
jhodgdonI don't think there is an Ubuntu package for the mentioned Adobe font, and as you said it is OpenType, which (in spite of what I said in an earlier comment) I am not convinced is working with our PDF generator. I am still having better luck with TrueType fonts.
So, I found an Ubuntu font package that covers CJK that seems to work OK for Japanese and Chinese -- it is called BabelStone Han. Here is the output. Can you take a look and see what you think? For the moment, I will commit this change to the User Guide repository, as it is definitely better than Unifont. If it is still not great for Japanese, I can install and switch to the Takao font for Japanese only (which I think doesn't cover Chinese). Please let me know what you think about this PDF.
Comment #8
jhodgdonComment #10
kabetani commentedThank you for trying new font!
BabelStone Han is much better than Unifont.
But it is less beautiful because the baseline is not properly aligned. Please see the attached picture.
Sorry for troubling you, could you use Takao font for Japanese translation?
Best regards.
Comment #11
jhodgdonSure! Fewer fonts is easier to maintain, but if the Takao font is superior, that is OK. I've modified the scripts to use the Takao Proportional Gothic font... see what you think. I'll commit the changes...
Comment #13
kabetani commentedGreat! It's perfect!
Thank you very much for your kind support.