Fonts
Customize typography on your documentation site with Google Fonts or self-hosted font files for headings, body text, and code blocks.
Set a custom font for your entire site or separately for headings and body text. Use Google Fonts, local font files, or externally hosted fonts. The default font varies by theme.
Configure fonts with the fonts property in your docs.json.
Google Fonts
Mintlify automatically loads Google Fonts when you specify a font family name in your docs.json.
"fonts": {
"family": "Inter"
}Local fonts
To use local fonts, place your font files in your project directory and reference them in your docs.json configuration.
Set up local fonts
Add font files to your project
For example, create a fonts directory and add your font files:
your-project/
├── fonts/
│ ├── InterDisplay-Regular.woff2
│ └── InterDisplay-Bold.woff2
├── docs.json
└── ...Configure fonts in docs.json
Reference your local fonts using relative paths from your project root:
{
"fonts": {
"family": "InterDisplay",
"source": "/fonts/InterDisplay-Regular.woff2",
"format": "woff2",
"weight": 400
}
}Local fonts for headings and body
Configure separate local fonts for headings and body text in your docs.json:
{
"fonts": {
"heading": {
"family": "InterDisplay",
"source": "/fonts/InterDisplay-Bold.woff2",
"format": "woff2",
"weight": 700
},
"body": {
"family": "InterDisplay",
"source": "/fonts/InterDisplay-Regular.woff2",
"format": "woff2",
"weight": 400
}
}
}Externally hosted fonts
Use externally hosted fonts by referencing a font source URL in your docs.json:
{
"fonts": {
"family": "Hubot Sans",
"source": "https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2",
"format": "woff2",
"weight": 400
}
}Font configuration reference
fontsobjectFont configuration for your documentation.
Show Hide Fonts
familystringrequiredFont family name, such as “Inter” or “Playfair Display.”
weightnumberFont weight, such as 400 or 700. Variable fonts support precise weights such as 550.
sourcestring (uri)URL to your font source, such as https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2, or path to your local font file, such as /assets/fonts/InterDisplay.woff2. Google Fonts load automatically when you specify a Google Font family name, so you don’t need a source URL.
format'woff' | 'woff2'Font file format. Required when using the source field.
headingobjectOverride font settings specifically for headings.
Show Hide Heading
familystringrequiredFont family name for headings.
weightnumberFont weight for headings.
sourcestring (uri)URL to your font source, such as https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2, or path to your local font file for headings. Google Fonts load automatically when you specify a Google Font family name, so you don’t need a source URL.
format'woff' | 'woff2'Font file format for headings. Required when using the source field.
bodyobjectOverride font settings specifically for body text.
Show Hide Body
familystringrequiredFont family name for body text.
weightnumberFont weight for body text.
sourcestring (uri)URL to your font source, such as https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2, or path to your local font file for body text. Google Fonts load automatically when you specify a Google Font family name, so you don’t need a source URL.
format'woff' | 'woff2'Font file format for body text. Required when using the source field.