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 margin edge gets cut off #177

Closed
daniel-j opened this issue Sep 27, 2019 · 2 comments
Closed

Text at margin edge gets cut off #177

daniel-j opened this issue Sep 27, 2019 · 2 comments
Labels
epub.js Related to Epub.js not our bug Needs to be fixed upstream or elsewhere

Comments

@daniel-j
Copy link
Contributor

daniel-j commented Sep 27, 2019

Some font glyphs can appear outside the margin, such as the letter f, and it's more visible with italic text. It happens on both side of a page, although it's most visible on the right side.

The issue can be seen on the Foliate screenshots (the word 'of').
screenshot

Here is a screenshot of mine. Increased the font to make it more visible.
Screenshot from 2019-09-27 08-48-38

I found Foliate the other day and started testing my ebooks with it. I think it's the best ereader currently on the Linux desktop. Keep up the good work!

@daniel-j daniel-j changed the title Text in margin gets cut off Text at margin edge gets cut off Sep 27, 2019
@daniel-j
Copy link
Contributor Author

daniel-j commented Sep 27, 2019

Looks like this is an issue with WebKit-based webviews. I did a small sample webpage to demonstrate the issue. It can be worked around though, by adding a wrapper to the body (view source. textbox2 should be the body element in a real case scenario).
Demonstration page: https://djazz.se/files/testcss.html
EPUB: https://djazz.se/files/testcase.epub
Screenshot from 2019-09-27 11-26-05 edit

Made an issue over at epub.js: futurepress/epub.js#983
WebKit bug report: https://bugs.webkit.org/show_bug.cgi?id=185056 (from over a year ago)

@johnfactotum johnfactotum added epub.js Related to Epub.js not our bug Needs to be fixed upstream or elsewhere labels Sep 27, 2019
@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.

daniel-j added a commit to daniel-j/foliate that referenced this issue Sep 28, 2019
daniel-j added a commit to daniel-j/foliate that referenced this issue Sep 28, 2019
johnfactotum added a commit to johnfactotum/foliate-js that referenced this issue Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epub.js Related to Epub.js not our bug Needs to be fixed upstream or elsewhere
Projects
None yet
Development

No branches or pull requests

2 participants