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

Embedded fonts cause vertical scrollbar in paginated mode #1535

Closed
Simon-Collinson opened this issue Aug 31, 2021 · 7 comments
Closed

Embedded fonts cause vertical scrollbar in paginated mode #1535

Simon-Collinson opened this issue Aug 31, 2021 · 7 comments

Comments

@Simon-Collinson
Copy link

We are testing some EPUBs in Thorium and have noticed a strange behaviour with some embedded fonts in paginated mode.

At certain font sizes and line spacing settings, the block content area seems to be marginally taller than the allocated vertical space, resulting in a scrollbar:
image

This does not occur when the user switches to an included font. It also seems to prevent the text from breaking across the column:
image

Our colleague Arthur has experimented and believes the problem may be related to users changing line spacing settings. Please let me know if you need a minimal working example or further info.

@danielweck
Copy link
Member

hello, yes please I would need an epub that exhibits this behaviour, and I will happily investigate '

@Simon-Collinson
Copy link
Author

Thanks, @danielweck - please see attached.
heart-of-darkness.zip

@danielweck
Copy link
Member

Very strange indeed! I am able to reproduce this easily. Looks like a web browser quirks. The problem disappears when setting CSS overflow: hidden on the body element, a technique which does not seem to introduce any negative side effects. I tested with paginated and scroll modes, as well as fixed layout documents, for good measure (as the CSS is applied for all types of publications alongside position: relative which is used to reset the coordinates reference frame for when drawing annotations / highlights)

@danielweck
Copy link
Member

Fixed via 1affa7a

@Simon-Collinson
Copy link
Author

Thanks for the info and the fix, @danielweck!

@danielweck
Copy link
Member

The problem disappears when setting CSS overflow: hidden on the body element, a technique which does not seem to introduce any negative side effects.

Unfortunately we found an reflowable EPUB that breaks because of this :(
(some CSS quirks it seems, I am not able to pin-point a style that would trigger this edge case in the cascade)

css-is-awesome

danielweck added a commit to readium/r2-navigator-js that referenced this issue Mar 4, 2022
@danielweck danielweck reopened this Mar 4, 2022
@danielweck
Copy link
Member

Fixed via 3d44c16
(see readium/r2-navigator-js@07a8c64 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants