Open Bug 1094481 Opened 10 years ago Updated 1 year ago

MathJax braces with HTML-CSS renderer broken when browser.display.use_document_fonts is 0

Categories

(Core :: Layout: Text and Fonts, defect)

32 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: vincent-moz, Unassigned)

Details

Attachments

(2 files)

With MathJax, when the HTML-CSS renderer is used, the horizontal braces are not correctly rendered when browser.display.use_document_fonts is set to 0 (allowing pages to choose their own font is off).

Example: https://en.wikipedia.org/wiki/Floating_point (currently in the second paragraph, after "For example:"). See the attached snapshot.
I've attached a second snapshot, showing what is seen when the MathML renderer is used. No problems with this renderer.
Isn't the HTML-CSS renderer just depending on particular font metrics that are correct for the font it specifies but not the one used as a fallback when you disallow the document from specifying fonts?
No, if you look at the snapshot, the cause isn't the font metrics since there is really garbage. It seems that undefined Unicode characters are used for that. It appears to be similar to bug 789788.
Severity: normal → S3

Is there a way to workaround this now that bug 1363454 is fixed?

I'm not sure how to test this right now -- on the Wikipedia page mentioned in comment 0, I'm getting the equation displayed as an image, so it's independent of fonts -- but if you determine which font is involved, you could add it to the browser.display.use_document_fonts.icon_font_allowlist list in about:config (even if it's not really an icon font in this case).

I'm not sure how to test this right now

On https://www.mathjax.org/#samples, set the rendering engine to CommonHTML.

but if you determine which font is involved, you could add it to the browser.display.use_document_fonts.icon_font_allowlist

I tried but to no avail, maybe I'm missing something?

After adding MJXZERO, MJXTEX, MJXTEX-I to the allowlist, it seems to work as expected for me. Which platform are you using? (Did you definitely confirm the change to the list (click the checkmark beside it) after editing it?)

Well, I missed MJXZERO when I tried, and after adding that it started to work.

Can we add those to the default and maybe do something for https://katex.org/ as well?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: