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

Fix problem with detecting whether ex-height can be computed, and work around jsdom problems #691

Merged
merged 1 commit into from
May 18, 2021

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Apr 27, 2021

This PR fixes a regression in 3.1.3 that causes liteDOM and jsdom adapters to get the ex-height badly wrong. This was due to changes made to process CJK characters that also added some default height, which confused the test to see if the exFactor needed to be used.

There are also some problems with jsdom's implementation of getComputesStyle(), which doesn't actually inherit styles, it only lists the ones explicitly on the given element. The CSSStyleDeclaration implementation is broken in a number of ways, and I've had to patch it before, but this issue would take some work. This PR adds options to the jsdom to set the font size and family to use (just as we do with the LiteDOM), since getComputedStyle() can't be trusted.

Resolves issue mathjax/MathJax#2694.

…'t use the broken getComputedStyle() function in jsdom.
@dpvc dpvc added this to the 3.2 milestone Apr 27, 2021
@dpvc dpvc requested a review from zorkow April 27, 2021 15:24
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

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

lgtm.

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