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

page: center and spread: none #104

Open
qnga opened this issue Aug 30, 2024 · 7 comments
Open

page: center and spread: none #104

qnga opened this issue Aug 30, 2024 · 7 comments

Comments

@qnga
Copy link
Contributor

qnga commented Aug 30, 2024

page: center has been more or less deprecated in EPUB for interesting reasons that apply to RWPM as well.

The discussion pointed out that page: center was more about the lack of spread than centering because all spreads are centered and fitted. In RWPM too I guess we use it mainly to convey the idea that the page must not be part of a spread, which is quite confusing. I think it would be better to have a better named property and to have a discussion about it at the same time as we think about #103.

@HadrienGardeur
Copy link
Collaborator

There's one key difference between the EPUB spec and RWPM though: we've moved away from providing controls over spreads to authors.

At best, we're offering the ability to indicate that a spread is meaningful now (#103) which is very different from what EPUB offers.

There are two main use cases for page: center:

  • covers where you want to place something at the center of the screen
  • and page spreads as a single image where you want to use the entire screen

For the second one, I would say that it's a counter-part to what we're discussing in #103.

@mickael-menu
Copy link
Member

That makes me think that in FXL EPUB we're supposed to display the first resource on its own by default (centered or not), unless otherwise is specified explicitly. It's something we didn't handle properly in Swift before.

I don't think we have this behavior specified in RWPM? It's pretty critical as it breaks any book laid out expecting spreads. I couldn't find it either in the EPUB specification, it's just the default behavior of Apple Books and so expected by book author.

@qnga
Copy link
Contributor Author

qnga commented Aug 30, 2024

covers where you want to place something at the center of the screen

What does that mean? Reading apps will fit the content, in a way depending to user preference or not. And no matter what the fit preference is, too small content will be centered.

and page spreads as a single image where you want to use the entire screen

Sure. Epub recommends the use of spread: none for this and it's far clearer. Besides, you're right, as the counter-part of meaningfulSpread, I wonder if both properties should not be related in the model.

@HadrienGardeur
Copy link
Collaborator

I don't think we have this behavior specified in RWPM? It's pretty critical as it breaks any book laid out expecting spreads. I couldn't find it either in the EPUB specification, it's just the default behavior of Apple Books and so expected by book author.

This doesn't necessarily belong in the spec IMO. It could be handled by automatically adding page: center to the first resource if it's missing any page property.

Sure. Epub recommends the use of spread: none for this and it's far clearer. Besides, you're right, as the counter-part of meaningfulSpread, I wonder if both properties should not be related in the model.

I wouldn't call the spread controls in EPUB "clear". It gives the illusion of control to anyone reading the specification, while in practice reading systems and users will do whatever they want (which is fine).
The only two values that make sense somehow are none (which can be aliased to page: "center" in RWPM) and both (which can be aliased to meaningfulSpread: true in RWPM).

Even with these values, the toolkits should still offer ways to override their default behaviour.

@qnga
Copy link
Contributor Author

qnga commented Aug 30, 2024

I think we agree on the use cases : spreads and fit are controlled by users. All we need in the manifest is a way to give information about the publication itself to offer meaningful (literally) spreads when the user wants spreads:

  • Are some resources full spreads on their own? This is weirdly covered by page: center in RWPM and spread: none in EPUB.
  • Are some resources part of a meaningful spread? This could be covered by meaningfulSpread.
  • Do some resources form spreads with blank pages? This is covered by page: left and page: right.

We might actually want an answer to question 1 even in no-spread mode if we want to disregard fit to keep a consistent scale between pages. Is that something we want to be able to do? It's hard to specify a data model without processing model.

@mickael-menu
Copy link
Member

This doesn't necessarily belong in the spec IMO. It could be handled by automatically adding page: center to the first resource if it's missing any page property.

I agree that it is not necessarily part of the spec, but it's still useful to document it in the processing model, so that authors know what to expect for the rendering. It was missing from EPUB and I mistakenly didn't assume that the first resource should be displayed on its own when implementing it.

@HadrienGardeur
Copy link
Collaborator

Are some resources full spreads on their own? This is weirdly covered by page: center in RWPM and spread: none in EPUB.

In EPUB this is covered by either page: center or spread: none. Since we've dropped spread, this is only supported through page: center in RWPM.

Do some resources form spreads with blank pages? This is covered by page: left and page: right.

More specifically, this is covered by consecutive uses of the same spread placement.

For example if the first and second resources are displayed on the right, then the first one is on its own.

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

3 participants