Fixing 縦書き text in EPUBs on Kindle for iOS

🦔 🦔 🦔

I was uploading a Japanese book in .epub format via Send to Kindle, but ran into a weird issue: the book would not display as right-to-left vertical text (縦書き), instead displaying as horizontal, left-to-right text, on the Kindle app for iOS and Mac, while still looking fine on my Kindle e-reader.

This note.com post by Atsu1166 has a fix that worked for me - edit the .epub file's .opf rootfile (This was content.opf in my case) to add the following tag in its <metadata>:

<meta name="primary-writing-mode" content="horizontal-rl"/>

For a bit more context, .epub files are really .zip archives containing all the files the book is made out of. You should be able to either unzip the file and edit that .opf rootfile manually, or, if you use Calibre, edit the epub to update it.

So far I only encountered .opf rootfiles located at the top of the archive, but apparently the EPUB standard specifies that these will be defined in the META-INF/container.xml file in a <rootfile> tag.

The more you know...

🦔 🦔 🦔