stump icon indicating copy to clipboard operation
stump copied to clipboard

[BUG] Issues with Japanese epubs

Open Arklaum opened this issue 4 months ago • 2 comments

Description of the Bug

For comparison:

  • Books in English turn the page left to right, and lines are written left to right, and new lines go top to bottom
  • Books in Japanese turn the page right to left, and lines are written top to bottom, and new lines go right to left. It's the same for Traditional Chinese books.

However for my Japanese books in stump: -Lines read top to bottom but align themselves at the bottom, and new lines go right to left. -Or lines read left to right but justify themselves to the right, and new lines go top to bottom.

And the punctuation is on the wrong side of the text.

Summary of the two issues:

  1. direction is wrong (should be ltr, because text goes "forwards")
  2. writing-mode is wrong (should be vertical-rl)

Screenshots

Issue 1 Comparison: Book 1 (Stump vs Apple Books)

Stump Apple Books
Image Image

Issue 2 Comparison: Book 2

Stump Apple Books
Image Image

Build Details: Nightly 1d86817


See #740 for updates

Arklaum avatar Aug 23 '25 22:08 Arklaum

@aaronleopold Would you actually want a PR with the foliate-js reader? The library hasn't reached stable release + no official npm package yet (I cloned it to browser/src/vendor/foliate-js)

I have a working draft in my fork sea-orm/foliate-js if it's of interest (no library included)

Arklaum avatar Aug 29 '25 00:08 Arklaum

@aaronleopold Would you actually want a PR with the foliate-js reader? The library hasn't reached stable release + no official npm package yet (I cloned it to browser/src/vendor/foliate-js)

I have a working draft in my fork sea-orm/foliate-js if it's of interest (no library included)

I would definitely consider it. I would probably lean more towards preferring Readium since the mobile app will most likely use it too and there are stable releases, but like I said in another thread somewhere where it was first mentioned if foliate can do everything which is functionally possible today with epub.js but with less headache then I would say it's a win.

I won't have time to look at your branch until the weekend, but I'd say if you're serious about getting a different epub reader added let's make sure to develop it as a separate component next to the existing one so we can fully test the two in isolation.

aaronleopold avatar Aug 29 '25 01:08 aaronleopold