Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Nov 9, 2023

This PR fixes a problem with determining the width of text that is in a system font rather than in the MathJax fonts. These come from \text{} then mtextInheritFont is true, or from error messages (when merrorInheritFont is true, which it is by default), or from characters that aren't in the MathJax fonts, like Chinese characters, or when a font-family is specified in a \style{} command or MathML style attribute.

You can't test this in the lab, as the issue only occurs when the math is typeset outside the DOM via MathJax.tex2chtml() or one of the other conversion functions, and then inserted into a container with a font-size that is other than 100%.

@dpvc dpvc requested a review from zorkow November 9, 2023 21:40
@dpvc dpvc added this to the v4.0 milestone Nov 9, 2023
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.

@dpvc dpvc merged commit b27f7d8 into develop Nov 20, 2023
@dpvc dpvc deleted the utext-width branch November 20, 2023 18:05
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.

3 participants