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

Epub Highlight text empty space. #335

Open
DominikKu opened this issue Feb 7, 2023 · 2 comments
Open

Epub Highlight text empty space. #335

DominikKu opened this issue Feb 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@DominikKu
Copy link

Bug Report

What happened?

When select more than few lines and mark it as highlight, note or underline, in the result selected area change to annotation correctly but have spaces beetwen text.

highlight
highlightselected

How to reproduce?

1.Open epub
2.Select more than few lines.
3.Mark as highlight, note or underline.

Environment

Android : 11
Device : One Plus 6
Readium version: develop branch - 20.01.2023, commit af2f764

@mickael-menu mickael-menu added the bug Something isn't working label Feb 7, 2023
@mickael-menu
Copy link
Member

There's a heuristic that merges highlight boxes together when they are close by. It might need to be adjusted although it depends from books to books.

let doNotMergeHorizontallyAlignedRects = true;
let clientRects = getClientRectsNoOverlap(
item.range,
doNotMergeHorizontallyAlignedRects
);

Could you share this book you used as an example?

Note that this is not high priority, so it probably won't be fixed (by the core maintainers) soon.

@DominikKu
Copy link
Author

This is the one of books when i could reproduce this situtaion but like you said it probably depends from books to books because it is reproducable only on few books.
https://drive.google.com/file/d/1qHhUGbRRY4IGsai64z8kVnbdAruWVKks/view?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants