Quote:
Originally Posted by jhowell
I am curious regarding your interest in converting vertical Chinese books to KFX format. Why not just use KF8? Is there something that the KF8 renderer does not handle properly or that the KFX renderer does better?
|
Indeed, the KF8 format has decent support for vertical text and ruby tags. However, Kindle only supports Page Flip (the feature that you see thumbnails of nine pages at the same time) for KFX files, which is useful for voluminous books. That's why I would like to convert my ePub books to KFX instead of KF8.
Quote:
I will add an experimental feature to convert vertical Chinese language books in the next KFX Output plugin release.
You will need to add <meta name="primary-writing-mode" content="vertical-rl"/> to the <metadata> section of the OPF to enable vertical text conversion. This is proprietary Amazon Kindle metadata and should be safe to add as it should be ignored by anything else.
|
Thank you for adding such a feature. After some fiddling around with the OPF file, we discovered that it is <spine page-progression-direction="rtl"> that requires lang=ja. If Kindle Previewer sees page-progrssion-direction=rtl, it will forcefully set primary-writing-mode=vertical, and primary-writing-mode=veritical requires lang=ja.
So maybe we could detect the value of page-progression-direction and decide whether the plugin should patch the language code. Or we could just add a function switch and let the user decide if they want this hack.
Quote:
When this is present the plugin will change the Chinese language code to Japanese for conversion and then will change it back within the KFX file produced. Doing that will allow conversion to succeed with vertical text and should also allow Chinese font selection in the resulting file.
|
Glad to know it is possible to change the language code back after the processing of Kindle Previewer!
Quote:
In your example you are applying the class "vrtl" to the <html> element. It seems that calibre does not handle this properly, resulting the the class styling being lost during conversion. I have reported it as a bug to the calibre developer.
In the mean time you can work around the problem by moving the class to the <body> element instead.
|
Thank you for reporting the bug to the author of calibre and the workaround!