Skip to content

Commit 2de38e4

Browse files
committed
Update fonts.mdx
1 parent 5b340a7 commit 2de38e4

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

fonts.mdx

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ description: "Configure custom fonts"
44
icon: "type"
55
---
66

7-
Use custom fonts to match your documentation's visual identity. You can configure fonts for your entire site or separately for headings and body text using either Google Fonts or local font files. The default font varies by theme.
7+
Configure fonts 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.
8+
9+
Fonts are controlled by the `fonts` property in your `docs.json`.
810

911
## Google Fonts
1012

@@ -105,10 +107,10 @@ You can also use external font URLs instead of local files:
105107
Font weight, such as 400 or 700. Variable fonts support precise weights such as 550.
106108
</ResponseField>
107109
<ResponseField name="source" type="string (uri)">
108-
URL to your font source, such as `https://mintlify-assets.b-cdn.net/fonts/Hubot-Sans.woff2` or path to your local font file like `/assets/fonts/InterDisplay.woff2`. [Google Fonts](https://fonts.google.com) are loaded automatically when you specify a Google Font `family` name, so no source URL is needed.
110+
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 are loaded automatically when you specify a Google Font `family` name, so no source URL is needed.
109111
</ResponseField>
110112
<ResponseField name="format" type="'woff' | 'woff2'">
111-
Font file format. Required when using local fonts.
113+
Font file format. Required when using the `source` field.
112114
</ResponseField>
113115
<ResponseField name="heading" type="object">
114116
Override font settings specifically for headings.
@@ -121,10 +123,10 @@ You can also use external font URLs instead of local files:
121123
Font weight for headings.
122124
</ResponseField>
123125
<ResponseField name="source" type="string (uri)">
124-
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](https://fonts.google.com) are loaded automatically when you specify a Google Font `family` name, so no source URL is needed.
126+
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 are loaded automatically when you specify a Google Font `family` name, so no source URL is needed.
125127
</ResponseField>
126128
<ResponseField name="format" type="'woff' | 'woff2'">
127-
Font file format for headings.
129+
Font file format for headings. Required when using the `source` field.
128130
</ResponseField>
129131
</Expandable>
130132
</ResponseField>
@@ -139,31 +141,12 @@ You can also use external font URLs instead of local files:
139141
Font weight for body text.
140142
</ResponseField>
141143
<ResponseField name="source" type="string (uri)">
142-
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](https://fonts.google.com) are loaded automatically when you specify a Google Font `family` name, so no source URL is needed.
144+
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 are loaded automatically when you specify a Google Font `family` name, so no source URL is needed.
143145
</ResponseField>
144146
<ResponseField name="format" type="'woff' | 'woff2'">
145-
Font file format for body text.
147+
Font file format for body text. Required when using the `source` field.
146148
</ResponseField>
147149
</Expandable>
148150
</ResponseField>
149151
</Expandable>
150152
</ResponseField>
151-
152-
### Separate fonts for headings and body
153-
154-
You can use different fonts for headings and body text:
155-
156-
```json docs.json
157-
{
158-
"fonts": {
159-
"heading": {
160-
"family": "Playfair Display",
161-
"weight": 700
162-
},
163-
"body": {
164-
"family": "Inter",
165-
"weight": 400
166-
}
167-
}
168-
}
169-
```

0 commit comments

Comments
 (0)