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

FXL improvements #75

Open
JayPanoz opened this issue Oct 28, 2024 · 4 comments
Open

FXL improvements #75

JayPanoz opened this issue Oct 28, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@JayPanoz
Copy link
Contributor

We’re aware Navigator could do with some improvements for Fixed-Layout EPUB support, which is why it could be a good idea to have this issue so that people can discuss and weigh in. It should eventually lead to prioritisation of the bits and pieces to support.

Right now, to determine whether it should display a single page or a spread, FXLFramePoolManager primarily checks if it’s in portrait. The portrait getter uses a combination of the manifest's presentation.spread property (only checking for spread: none at the moment), and the current orientation of the screen, determined by the height being larger than the width. This serves as some sort of auto-layout mode for FXL that implementers get out of the box.

In Readium Playground, we already set some requirements re. a full-fledged auto-layout:

  • defaulting to a single page spread for anything smaller in width than an arbitrary breakpoint (e.g. iPad in landscape mode)
  • displaying a two page spread for anything larger than that
  • but supporting the following properties as well:
    • "page": "center" to force a single centered page
    • "meaningfulSpread": true or "spread": "both" in the readingOrder to force the display of a full spread.

As for the user setting:

  • support for a single page mode
  • support for a forced spread mode

Note there’s a resize handler on resize and orientationChange. Not sure whether implementers would like to disable/prevent it, but this issue should hopefully help answer such a question.

@JayPanoz JayPanoz added the enhancement New feature or request label Oct 28, 2024
@chocolatkey
Copy link
Member

@JayPanoz Something I think would be useful for this discussion would be some examples of EPUBs with complex spread layout. The logic I implemented as a stopgap measure in the ts-toolkit at the moment has worked well for a large selection of EPUBs at DeMarque, because they're all just a simple "book-like" layout, with each page being like the page of a physical book, and landscape pages being full spreads.

@JayPanoz
Copy link
Contributor Author

Yeah completely agree. At the time we created ReadiumCSS, we built a test-case of reflowable EPUB files that could help inform decisions and implement features reliably. It took a little bit of time at first but helped save a lot further down the line. It would be a good idea to do that for FXL too.

This is probably something we want to discuss with other Readium maintainers during the next call, as it could benefit them as well.

@mickael-menu
Copy link
Member

If that's of any help, I modified Bella the dragon a while back to get unusual dimensions for testing purposes:

bella-landscape.epub.zip
bella-tall.epub.zip

@qnga
Copy link

qnga commented Oct 30, 2024

What about page: left/right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Icebox
Development

No branches or pull requests

4 participants