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

Text at page margin edge gets cut off in WebKit webviews #983

Closed
daniel-j opened this issue Sep 27, 2019 · 1 comment
Closed

Text at page margin edge gets cut off in WebKit webviews #983

daniel-j opened this issue Sep 27, 2019 · 1 comment

Comments

@daniel-j
Copy link
Contributor

daniel-j commented Sep 27, 2019

Seems to be an issue with WebKit-based renderers (such as GNOME Epiphany, Safari on macOS/iOS and Foliate) combined with columns. A workaround is to wrap all nodes in mode in a container element and set a margin/padding/invisible border on it, while lowering the column-gap and outer paddings.
See this demonstration page (use a WebKit browser): https://djazz.se/files/testcss.html
Test case EPUB: https://djazz.se/files/testcase.epub
Screenshot from 2019-09-27 11-26-05 edit
Screenshot from 2019-09-27 13-24-30

Related Foliate issue: johnfactotum/foliate#177
WebKit bug report: https://bugs.webkit.org/show_bug.cgi?id=185056

@daniel-j
Copy link
Contributor Author

daniel-j commented Sep 28, 2019

Inspected an ebook with Apple Books and found out about -webkit-line-box-contain: block glyphs replaced; that they set on the html element. This fixes the rendering issue if I set that on the CSS of my test page.
EDIT: I tried to set this on the body style of an epub and it renders correctly! Does not fix glyph overflow in vertical mode though.

@fchasen fchasen closed this as completed in 5edf4c3 Nov 7, 2019
fchasen added a commit that referenced this issue Nov 7, 2019
Fix glyph clipping in WebKit. Fixes #983
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

1 participant