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

Inter word text decoration, fix TOC page numbers, reproducible cache files #286

Merged
merged 3 commits into from
May 4, 2019

Conversation

poire-z
Copy link
Contributor

@poire-z poire-z commented May 3, 2019

Ensure text decoration (underline) is continued over word gaps

Depending on the added space between words to ensure text justification, underline (eg: for links spanning multiple words) could have some cuts.
(We can still have some cuts when the words are in distinct text nodes, eg with <a href="">Louis <span class=roman>XIV</span></a>, less easy to fix.)

Before:
before

After:
after

Invalidate TOC page numbers on rendering change

As page numbers are calculated only when needed, they could still gather old numbers after book re-rendering, which could lead to wrong TOC page numbers when loading from cache. Details along koreader/koreader#4972 (comment)

Ensure reproducible cache files when same rendering settings

Have cache files have the same file checksum by zero'ing struct padding, getting rid of random data when they are serialized into the cache file. Details along koreader/koreader#4972 (comment)

Depending on the added space between words to ensure text
justification, underline (eg: for links spanning multiple
words) could have some cuts.
As page numbers are calculated only when needed, they
could still gather old numbers after book re-rendering,
which could lead to wrong TOC page numbers when loading
from cache.
Have cache files have the same file checksum by zero'ing
struct padding, getting rid of random data when they are
serialized into the cache file.
Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@poire-z poire-z merged commit a783b53 into koreader:master May 4, 2019
@poire-z poire-z deleted the cache_toc_textdeco branch May 4, 2019 17:49
@poire-z
Copy link
Contributor Author

poire-z commented May 4, 2019

(I'll bump that after next stable.)

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

Successfully merging this pull request may close these issues.

2 participants