A better font would be good for Japanese
Closed this issue · 12 comments
It seems in PDF Japanese uses not a very good font especially for documentation.
How do you generate the PDF? I wonder what format of fonts we can use for it.
All the rendering is done by gitbook, and their advice seems to be to solve it with a CSS for the PDF.
When I read that, I was reminded that I already changed CSS for PDF generation in the sister project http2 explained but we didn't do any particular adjustments for Japanese there. Is that PDF using the same/bad font as this?
They use the same font as well. I assume this font is Chinese based and it has different enhancement for "。、" symbols. I'm not familiar with the font adjustments using GitBook but do you use any particular environment to generate the pdf like your own server? In that case you maybe need to install a Japanese font.
do you use any particular environment to generate the pdf like your own server?
I don't. I let gitbook generate everything...
$ strings ~/Downloads/http3-explained-ja.pdf | grep -i FontName
/FontName /AAAAAA+ArialMT
/FontName /AAAAAB+UKaiCN
/FontName /AAAAAC+IPAGothic
/FontName /AAAAAD+Arial-BoldMT
/FontName /AAAAAE+LiberationMono
IPAGothic
might be an option.
https://github.com/GitbookIO/gitbook/blob/master/docs/config.md#pdf-options
Hmm I don't know why, but the font setting seems not working.
It might be because you are using the legacy gitbook(or it might not lol).
I forked my repo into my GitBook with non legazy GitBook and generating pdf with the exact same book.json, then it generated with IPA Gothic .-.
Working fine for me as well using very defualt setting.
$ ebook-convert --version
ebook-convert (calibre 3.35.0)
Created by: Kovid Goyal <kovid@kovidgoyal.net>
$ gitbook --version
CLI version: 2.3.2
GitBook version: 3.2.3
Does it work with placing the file in ja, such as ja/book.json?
e.g.
https://github.com/vuejs/vuex/blob/dev/docs-gitbook/ja/book.json
Let's see.
Darn, it worked! Such a weird behavior it was... -_-
I'm closing this now as it's solved.