Page MenuHomePhabricator

\bf operator is ignored
Closed, ResolvedPublicBUG REPORT

Description

I am using ubuntu 24 with the latest chrome version with the font art DejaVu Math Tex Gyre. (But with other fonts the result is the same.)

The Latex-Code <math>{\bf Spec}, \bf A, \bf B, \bf C, \bf D, \bf E, \bf F, \bf G</math> is not rendered correctly using Native MathMl. The letters are not displayed in bold.

image.png (200×737 px, 30 KB)

Event Timeline

Do you have the link from where the screeshot was taken?

Thank you. Local testing reveals that the problem seems to be that chrome ignores mathvariant=bold.

Physikerwelt triaged this task as Medium priority.

See https://developer.mozilla.org/en-US/docs/Web/MathML/Element/mi#bold explains that the mathvariant solution is actually deprecated. We can use the same procedure as we used for fraktur etc.

Change #1110455 had a related patch set uploaded (by Physikerwelt; author: Physikerwelt):

[mediawiki/extensions/Math@master] Add fallback unicode mappings for bold font

https://gerrit.wikimedia.org/r/1110455

I've added this as case 13 at https://www.mediawiki.org/wiki/Extension:Math/Native_MathML/Reported_Cases.

It seems to render fine in Firefox already without this patch, but indeed not in Chrome:

Firefox 134:

Screenshot 2025-01-13 at 00.26.06.png (444×592 px, 41 KB)

Chrome 131:

Screenshot 2025-01-13 at 00.27.07.png (442×758 px, 42 KB)

With the patch applied locally, it renders bold in both (top Chrome, bottom Firefox):

Screenshot 2025-01-13 at 00.29.58.png (314×736 px, 49 KB)

Change #1110455 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Add fallback unicode mappings for bold font

https://gerrit.wikimedia.org/r/1110455

Change #1112264 had a related patch set uploaded (by Krinkle; author: Physikerwelt):

[mediawiki/extensions/Math@REL1_43] Add fallback unicode mappings for bold font

https://gerrit.wikimedia.org/r/1112264

Change #1112264 merged by jenkins-bot:

[mediawiki/extensions/Math@REL1_43] Add fallback unicode mappings for bold font

https://gerrit.wikimedia.org/r/1112264