Closed Bug 2088432 Opened 25 days ago Closed 24 days ago

Use the page font instead of Arial for Mermaid diagrams

Categories

(Developer Infrastructure :: Source Documentation, enhancement)

enhancement

Tracking

(firefox161 fixed)

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: dao, Assigned: dao)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

Mermaid diagrams in firefox-source-docs render their text in Arial (Liberation Sans on Linux), beside the page's Lato body text. The redux-color theme asks for "Recursive Variable", which neither the docs nor sphinx-rtd-theme load, so the browser falls back.

Setting themeVariables.fontFamily in mermaid_init_config to sphinx-rtd-theme's body font stack fixes it for every mermaid diagram type in both color schemes. Diagram widths move by between -4.7% and +1.8% across the tree's diagrams, and no label overflows its box. ZenUML hardcodes Helvetica and stays as it is.

Dropping fontSize changes no diagram's layout: sphinx-rtd-theme's p rule already kept flowchart, state and class labels at 16px, and Mermaid 12 draws sequence diagrams at a fixed 16px.

Assignee: nobody → dao+bmo
Status: NEW → ASSIGNED
Attachment #9672978 - Attachment description: Bug 2088432 - Use the page font instead of Arial for Mermaid diagrams. r?#firefox-source-docs-reviewers,#ai4dev-reviewers → Bug 2088432 - Use the page font instead of Arial for Mermaid diagrams. r?#firefox-source-docs-reviewers
Pushed by dgottwald@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/54b83e0f88ae https://hg.mozilla.org/integration/autoland/rev/32d19570a5a4 Use the page font instead of Arial for Mermaid diagrams. r=firefox-source-docs-reviewers,ai4dev-reviewers,padenot,sylvestre
Status: ASSIGNED → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: