Computing reading progression
qnga opened this issue · 3 comments
I think the reading progression defined in a publication should have higher priority than the one guessed from the language, and Epub specification agrees with me. This is currently not the case in Kotlin implementation.
Before the introduction of the new shared model, I changed the computation of reading progression as here.
I suggest we reintroduce my implementation, and document the algorithm in the architecture.
I think this makes sense but I'd like @JayPanoz to chime in as well since he's the one who authored the EPUB parser guidelines.
Yes it should, especially as guessing from language is a fallback in case it isn’t present – because rtl books in epub2 exists for instance, and they won’t pass epubcheck with a page-progression-direction
, unless the vendor makes an exception.
ReadiumCSS has quite a long doc about that, and in case the page-progression-direction
is missing, even states:
The decision to handle this edge case is up to each implementer, especially as it can be considered a patch of an authoring failure.
Because guessing is complex and has many traps so it would have been a burden to impose this decision to implementers.
Since it's part of the Publication models, I'll go ahead and fix this in the Kotlin PR. For Swift, I'll add it here readium/swift-toolkit#80