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

Force width of -explicitFont text (work around Safari bug) #699

Merged
merged 1 commit into from
May 24, 2021

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented May 12, 2021

This PR worked around a bug with WebKit that mis-measures regular text (like error messages) and so produces the wrong bounding boxes. For example, a TeX error message will get the yellow background size wrong. The problem is that the MJXZERO font seems to confuse WebKit (that is also the source of the problem with parts of characters disappearing). I'd like to fix this during the font update this summer, but for now, this is a work-around.

The fix is to remove the MJXZERO font during the measuring process, and then specify the width explicitly on the final text element. Not great, but it works for now.

You can test in Safari by causing any TeX error (e.g., \end with no name, or \begin{xyz}).

@dpvc dpvc requested a review from zorkow May 12, 2021 22:19
@dpvc dpvc added this to the 3.2 milestone May 12, 2021
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.

I don't have safari so have to trust that is works.

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