mathjax / mathjax/MathJax

STIXNonUnicode rendering issue in Chrome on Mac with the HTML-CSS renderer

Open
#2,988 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Accepted Ready for Development v2
Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Issue Summary

\cal does not render in Chrome on Mac with the default HTML-CSS renderer.

Steps to Reproduce:

This was reported to me in the wild in https://arxiv.org/abs/hep-th/9802109, but I extracted a minimal reproducer:

<!DOCTYPE html>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=default"></script>
\(\cal N\)

(JSBin: https://jsbin.com/sopewoyoga/edit?html,output)

Load in Chrome, Firefox, and Safari on Mac. In Chrome, the N appears as a box.

Technical details:
  • MathJax Version: 2.7.9
  • Client OS: macOS Version 13.1 (Build 22C65)
  • Browser: Chrome 109.0.5414.87

(arXiv seems to be on 2.7.3, but I updated to the latest 2.x release to confirm the issue wasn't already fixed. I was't able to reproduce this with v3, but it seemed, from https://www.mathjax.org/#gettingstarted, that v2 was still supported.)

I am using the following MathJax configuration: ?config=default

and loading MathJax via

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.9/MathJax.js?config=default"></script>

(I just adapted this from https://docs.mathjax.org/en/v2.7-latest/configuration.html#loading-mathjax-from-a-cdn; arXiv has their own copy.)

Supporting information:

I initially filed this on the Chrome side (I work on Chrome, but not anywhere near fonts) as https://crbug.com/1408154. That bug has some more details. It looks like the immediate change on the Chrome side was a change that caused MathJax to switch from the "HTML-Common" render to the "HTML-CSS" renderer.

This seems to relate in some way to the STIXfontBug workaround in MathJax. MathJax is using a slightly different style attribute between Chrome/Safari and Firefox, but the one sent to Chrome/Safari doesn't work in Chrome. The one sent to Firefox does though.
https://github.com/mathjax/MathJax/blob/legacy-v2-develop/unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js#L1579-L1600

I tossed it to one of our fonts folks, who responded here: https://bugs.chromium.org/p/chromium/issues/detail?id=1408154#c1. Sounds like it's unclear whether it's an MathJax issue or a Chromium one. (And that in the latter case, a smaller reproducer would be handy.) I don't know anything about fonts, but I'm hoping that between the two of you, you all can figure out where it is. :-)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the minimal HTML reproducer and the STIXfontBug workaround in unpacked/jax/output/HTML-CSS/fonts/STIX/fontdata.js around lines 1579-1600. Compare the HTML-CSS output and style attributes in Chrome, Firefox, and Safari, using the linked Chromium report for context. Done means either restoring the \cal N rendering in Chrome or clearly isolating the issue to Chromium with a smaller reproducer.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.