Why Trebuchet? #7335
-
|
I'm just curious -- why does every theme (or at least most themes) use Trebuchet MS? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Trebuchet MS was chosen for a few practical reasons:
You can override it in any theme by setting the mermaid.initialize({
theme: "default",
themeVariables: {
fontFamily: "Inter, system-ui, sans-serif"
}
});Or in a Markdown front-matter config block if your renderer supports it. |
Beta Was this translation helpful? Give feedback.
-
|
@manimovassagh Thanks for the history lesson! |
Beta Was this translation helpful? Give feedback.
Trebuchet MS was chosen for a few practical reasons:
Wide availability — it is a core web font that ships with Windows, macOS, and most Linux desktop environments. This means diagrams render consistently across platforms without requiring a custom font to be loaded.
Readability at small sizes — Trebuchet MS was designed by Vincent Connare at Microsoft specifically for screen readability. For diagrams where node labels and edge text can be quite small, this matters more than it would for body text.
Compact character width — compared to Arial or Verdana, Trebuchet is slightly narrower, which helps fit more text into diagram nodes without overflow.
Historical — mermaid has been aroun…