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
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
and --font-bold
, then the italic will remain
as Source Sans Pro Italic.
info
Do you want to customize the fonts for code or sketch mode? Please raise an Issue on GitHub. We'll support this if there's demand.