Fonts
D2 uses 4 font families:
- Source Sans Pro for the majority of text, including labels, Markdown, etc.
- Source Code Pro for code blocks and text in Class shape.
- A blend of Architect's Daughter
and Fuzzy Bubbles for
sketch
mode text.
Currently on the CLI, you can customize fonts by replacing Source Sans Pro with your own TTF files through the following flags:
--font-regular
--font-italic
--font-bold
--fond-semibold
These should point to a .ttf
file, for example:
It's advisable to supply either none or all of the fonts, for consistency. If you supply
one but not all of the fonts, it will fall back to Source Sans Pro for the missing styles.
For example, if you give a --font-regular
, --font-bold
, and --font-semibold
, then the
italic will remain as Source Sans Pro Italic.
Mono fonts
If you'd like to customize the mono fonts:
--font-regular
--font-italic
--font-bold
--fond-semibold
Sketch font
In sketch mode, if you supply a font, it will replace the default hand-drawn font family instead of Source Sans Pro.