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

Multi-Page empty space in Standard Ebook titles. #941

Closed
ghost opened this issue Sep 14, 2022 · 2 comments
Closed

Multi-Page empty space in Standard Ebook titles. #941

ghost opened this issue Sep 14, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Sep 14, 2022

Describe the bug
For some reason, Foliate displays multiple empty pages in between the Titlepage and Imprint of Standard Ebook titles, in all available ebook formats.

To Reproduce

  1. Open any SE epub with Foliate (for example, this one).
  2. Starting at the Titlepage, naviagate through the ebook's pages using the arrow keys.
  3. Change pages (press forward on your arrow keys) about 10-24 times (depending on your Foliate window size).
  4. Arrive at the Imprint after all those key presses.

Note: Also works when changing pages with mouse clicks, but is much more tedious since clicks need to be spaced out.

Expected behavior
Arrive at the Imprint from the Titlepage in a single click/key-press. This works properly in all other ebook app/readers I've tested (though, not exhaustively).

Version:

  • Foliate version: 2.6.4
  • OS/Distribution and version: Fedora 36
  • Desktop environment: Gnome 42
  • Installation method: Native rpm from Fedora repos.
@ghost ghost added the bug Something isn't working label Sep 14, 2022
@johnfactotum
Copy link
Owner

So apparently they changed the titlepage and added invisible elements with font size set to zero, and it does work. The problem is that Foliate tries to force the user's preferred font size on all p elements. So the font size of the p in the titlepage is no longer zero.

The best solution would probably be to stop forcing font size on p, which already breaks too many books, anyway. At least we should probably try to lower the specificity.

And maybe this could be fixed in Epub.js as well, because I think it's using the width returned by .getBoundingClientRect(). Perhaps the bug could be fixed if one could account for negative overflows when calculating the width.

@johnfactotum
Copy link
Owner

This is fixed in the gtk4 branch, as it doesn't force font size anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant