You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Linux font fallbacks for Mermaid SVG text rendering #371
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.from-prIssue created from an external PR during triagepriority: lowP3 - nice to have / minor / cosmetic
crates/jcode-tui-mermaid/src/mermaid_content.rs font stack lacks Linux-native fallbacks (DejaVu Sans, Liberation Sans), which can produce invisible/missing Mermaid labels with resvg on Linux.
Credit: originally proposed in PR #108. This repo no longer accepts external PRs, so the problem is tracked here instead.
Triage: confirmed in crates/jcode-tui-mermaid/src/mermaid_content.rs:267 (terminal_theme). The font stack is "Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif" with no Linux-native fallbacks (DejaVu Sans, Liberation Sans). resvg resolves fonts via a fontdb loaded with load_system_fonts() (lib.rs:422-426), and the primary family is picked as the first comma-entry (mermaid_svg.rs:primary_font_family, defaulting to "Inter"). On Linux systems without Inter/Segoe UI installed, label text can fail to resolve a glyph face and render missing/invisible.
Fix path: add DejaVu Sans / Liberation Sans (and Noto Sans) to the family list so a commonly-installed Linux face is matched. Low-risk, localized; autonomous: likely.
autonomous: likelyProbably hands-off: clearly worth fixing, agent can do it, minor judgment needed.from-prIssue created from an external PR during triagepriority: lowP3 - nice to have / minor / cosmetic
Activity
1jehuang commentedon Jun 25, 2026
Triage: confirmed in
crates/jcode-tui-mermaid/src/mermaid_content.rs:267(terminal_theme). The font stack is"Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif"with no Linux-native fallbacks (DejaVu Sans, Liberation Sans). resvg resolves fonts via a fontdb loaded withload_system_fonts()(lib.rs:422-426), and the primary family is picked as the first comma-entry (mermaid_svg.rs:primary_font_family, defaulting to "Inter"). On Linux systems without Inter/Segoe UI installed, label text can fail to resolve a glyph face and render missing/invisible.Fix path: add DejaVu Sans / Liberation Sans (and
Noto Sans) to the family list so a commonly-installed Linux face is matched. Low-risk, localized; autonomous: likely.1jehuang commentedon Jun 25, 2026
Fixed in
b96dfa47(pending release). Built and tests pass on Linux. See commit message for the specific change for this issue.Fix several triaged GH issues (#369, #371, #373, #365, #374, #402)
1jehuang commentedon Jun 28, 2026
Released in v0.32.0. Run
jcode updateto get it.Fix several triaged GH issues (1jehuang#369, 1jehuang#371, 1jehuang#373…
Fix several triaged GH issues (1jehuang#369, 1jehuang#371, 1jehuang#373…