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

Line height not always correctly updated after font change #370

Open
rkwright opened this issue Feb 2, 2017 · 0 comments
Open

Line height not always correctly updated after font change #370

rkwright opened this issue Feb 2, 2017 · 0 comments

Comments

@rkwright
Copy link
Member

rkwright commented Feb 2, 2017

This issue is a Bug

Related issue(s) and/or pull request(s)

See ResizeSensor thread, #308

Expected Behaviour

Line height should be set correctly on the current page after a font change

Observed behaviour

Instead, Readium does not always set the line height for the current page to the right value. This is apparently because the computed height hasn't been completed when we go to re-layout the page. The font has been changed but the computedStyle isn't done yet.

Since it is a form of race condition the problem doesn't always occur. It is hard to reproduce in the Chrome JSApp, but relatively easily reproduced in the CloudReader on Safari on OSX.

Steps to reproduce

  1. Open a page in some EPUB
  2. Change the font so that the line-height changes
  3. Examine the line-height. Note that it is not correct (not always but usually)
  4. Move to the next (or previous page). Note that line-height is now correct.
  5. Go back to the original page (on which the font was changed).
  6. NOW the line-height is correct.

Test file(s)

Pretty much any. Accessible EPUB, for example.

Product

Any Readium-1 based app which uses the font layout machinery in shared-js

Additional information

None

####Notifications
@danielweck
@olivierkorner
@jccr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant