Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPUBs with vertical text not working properly in WebKit #957

Closed
johnfactotum opened this issue Jul 8, 2019 · 6 comments
Closed

EPUBs with vertical text not working properly in WebKit #957

johnfactotum opened this issue Jul 8, 2019 · 6 comments

Comments

@johnfactotum
Copy link
Contributor

In WebKit, books with vertical text only displays the beginning of each chapter (spine item). For example, when rendition.next() is called, it displays the next chapter instead of the next page. This only happens in WebKit; it works fine in Firefox and Chromium.

A book sample that can demonstrate this problem can be downloaded here: https://www.mobileread.com/forums/showthread.php?t=215310

@fchasen
Copy link
Contributor

fchasen commented Jul 10, 2019

Very strange. I'd guess that the measurements of the text height are returning the wrong value in WebKit, so it thinks there is only 1 page.

Will need to investigate some more.

@johnfactotum
Copy link
Contributor Author

Not sure if this would be helpful, but I've stumbled across a blog post in which a vertical text book seems to be correctly handled by Epub.js: http://moebuntu.blog48.fc2.com/blog-entry-1292.html. So apparently it doesn't happen with all books with vertical text.

@johnfactotum
Copy link
Contributor Author

It seems to have gotten worse in 0.3.87.

Using 0.3.86:
image

Using 0.3.87:
image

Furthermore, with 0.3.86, it's only broken on WebKit, but now in 0.3.87, it's broken in Firefox and Chromium as well.

@fchasen
Copy link
Contributor

fchasen commented May 19, 2020

Humm, taking a look. I suspect it isn't getting the correct text direction.

@fchasen
Copy link
Contributor

fchasen commented May 23, 2020

Looks like this original issue was cause by -webkit-column-axis=horizontal being applied to the vertical text.

The new issues in 0.3.87 was from direction: rtl being applied to the vertical text and causing all sorts of strange layout in chrome.

Both fixed in #1064

@fchasen fchasen closed this as completed May 23, 2020
@johnfactotum
Copy link
Contributor Author

johnfactotum commented May 23, 2020

The fix works great! But I'm encountering a problem: when leaving height undefined in the renderTo options, with horizontal text it will automatically set the height to 100%, but with vertical text, instead of setting the height at 100% it seems to set it to the height of the entire section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants