Closed hyhchan closed 4 years ago
I think it is a font issue. For example, with Source Han Serif:
But if you use Source Han Serif TC, then the punctuation is centered:
In the case of Source Han Serif, the font does include different glyphs for different languages. If the lang
attribute is set correctly, it should use different glyphs with different languages. But this does not appear to have any effect in WebKitGTK. So this might be a WebKitGTK bug.
I think ideally we should add the option to set a different font for each language.
Thanks. Yes it is a font issue. Somehow my system defaulted to a Japanese font with a weird end colon. After selecting another font for TC it works.
Somehow my system defaulted to a Japanese font with a weird end colon. After selecting another font for TC it works.
I'm interested in this as a learner of the Chinese language. Do you have any recommendations of fonts that you particularly like for their typography? @hyhchan
I think ideally we should add the option to set a different font for each language.
@johnfactotum What happens if a particular font is not present on the system? Would it make sense to bundle it with Foliate if it is not shipped by distribution maintainers by default? Would that even work?
Perhaps we could reopen this issue to track suggestions for a good Chinese default font?
I don't think it's practicable to ship fonts with Foliate. Font packages are huge, and a lot of people don't need support for a lot of languages, so even distros often don't install non-Latin fonts by default for that reason. Maybe we can bundle a default, nicer font than Serif (which I think on most system defaults to Deja Vu Serif -- personally I think it looks fine), but bundling a CJK font is simply a bad idea because they can get really huge (several hundred MB) in size. I guess you can bundle a slimmed down version, but there's no point in doing that since the user can easily install and use any font they like from the distro repo or manually, and those who would need it most likely would have already had one installed. Also note that many books already have embedded fonts.
Also, I don't think it's technically possible to ship custom fonts with Foliate, because Foliate uses GTK's font chooser, and, AFAIK, we cannot add custom fonts to it because fontconfig
doesn't support GObject introspection, so we can't access it in GJS (if anyone knows a good way to do that I would be very interested to know).
@digitalethics Sorry I don't really have a preference on fonts, etc. I am more concern on the correct representation of the text since I am using Chinese ebooks to let my kids learn Chinese and having the books to be rendered in a correct way is hugely important for me. Nowadays most systems has most language installed and the default usually works well. For my case I think I installed some for CJK extension of some applications and got installed a font that has a wrong rendition of the colon, and somehow foliate mapped that font as default. It didn't show up in all my other programs so I didn't realize that it is the font problem. Off topics a bit, the way punctuation marks are put at the corners is more a Japanese way, although mainland China also adopted the use (but many mainland Chinese books are printed horizontally, which run against the tradition). Traditional Chinese (HK, Taiwan) would put the marks at the center. And believe it or not, modern Chinese punctuation marks only has 100 or so years of use. It was first promoted by scholars in the 1910s and 1920s. Ancient Chinese text didn't use punctuation much.
I am using Chinese ebooks to let my kids learn Chinese and having the books to be rendered in a correct way is hugely important for me.
Thanks for sharing! I don't mind reading some easy Chinese ebooks to brush up my reading comprehension. Maybe you can share some Chinese-language (or language learning related) OPDS links that could even be added as defaults (so that others can discover it too) if @johnfactotum agrees?
I have some ideas in the pipeline how Foliate could be more of an educational tool, especially in regards to learning Chinese and tutoring others in any other reading-intensive subject. What would be helpful for me (and I'm sure for anyone who reads Chinese ebooks to learn the language) is a way to add a feature to see the stroke order of Chinese characters in an animated form when hovering over or clicking on a character. Another idea is to offer a way to export annotations or highlighted text to Anki, a spaced repetition programme. I haven't quite finished reading up about these topics but will make a new feature request when I have some more specific ideas how this could be realized and what projects could be utilized for implementing this. Would you be interested in something like this for your kids? If yes, then I'd ping you when I get to write this up.
I guess you can bundle a slimmed down version, but there's no point in doing that since the user can easily install and use any font they like from the distro repo or manually
Maybe we can aggregate information on fonts and typography and add it to the wiki so that users can discover fonts that will improve their reading experience for specific use cases. I remember there was a project that would even depict Chinese characters in conjunction with the pinyin romanization. The benefit for language learners would be immense. Of course, this font does not come preinstalled on any distribution and I doubt it is even in any repositories.
I don't think it's technically possible to ship custom fonts with Foliate, because Foliate uses GTK's font chooser, and, AFAIK, we cannot add custom fonts to it because fontconfig doesn't support GObject introspection, so we can't access it in GJS (if anyone knows a good way to do that I would be very interested to know).
I'm not sure if this is in any way helpful but here's an idea: Do you think it would make sense to create a "font repository" on a server and allow users to browse this repository from within Foliate and enable or disable them via your proposed plugin architecture? Another fascinating idea would be to be able to render Chinese texts in different calligraphic styles and switch between them by clicking a button or via a keyboard shortcut.
I remember there was a project that would even depict Chinese characters in conjunction with the pinyin romanization.
That's not really a good idea since a character very often has several different pronunciations.
I'm not sure if this is in any way helpful but here's an idea: Do you think it would make sense to create a "font repository" on a server and allow users to browse this repository
I think that would be out of the scope of Foliate.
Don't know if this is related to foliate or setting, but it seems that the full width punctuation rendering is different from epub.js and foliate.
Below is a screen cap from foliate:
And this is the same book opened in epub.js example/input.html on a locally built epub.js
2 things to note:
I tried setting several different fonts in foliate but it seems the same.