Skip to content

Commit 59ac8bb

Browse files
feat: custom fonts (#255)
* Update global.mdx * Update global.mdx * Update global.mdx * Update global.mdx * add details * remove space --------- Co-authored-by: Hahnbee Lee <[email protected]>
1 parent 42225d9 commit 59ac8bb

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

settings/global.mdx

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,35 @@ settings. Learn more about the [properties](#properties) or from an
9191
Set a custom background image to be displayed behind every page.
9292
</ResponseField>
9393

94+
<ResponseField
95+
name="font"
96+
type={
97+
"FontDetailsType | { headings?: FontDetailsType, body?: FontDetailsType }"
98+
}
99+
>
100+
Custom fonts. Apply globally or set different fonts for headings and the body
101+
text.
102+
<Expandable title="FontDetailsType">
103+
<ResponseField name="family" type="string" required>
104+
The font family name. Custom fonts and all [Google
105+
Fonts](https://fonts.google.com/) are supported. e.g. "Open Sans",
106+
"Playfair Display"
107+
</ResponseField>
108+
<ResponseField name="weight" type="number">
109+
The font weight. Precise values such as `560` are also supported for
110+
variable fonts. Check under the Styles section for your Google Font for
111+
the available weights.
112+
</ResponseField>
113+
<ResponseField name="url" type="string">
114+
The URL to the font file. Can be used to specify a font that is not from
115+
Google Fonts.
116+
</ResponseField>
117+
<ResponseField name="format" type="'woff' | 'woff2">
118+
The font format. Required if using a custom font source (`url`).
119+
</ResponseField>
120+
</Expandable>
121+
</ResponseField>
122+
94123
<ResponseField name="modeToggle" type="ModeToggle">
95124
Customize the dark mode toggle.
96125
<Expandable title="ModeToggle">
@@ -100,7 +129,6 @@ settings. Learn more about the [properties](#properties) or from an
100129
</ResponseField>
101130
<ResponseField name="isHidden" type="boolean" default={false}>
102131
Set to true to hide the dark/light mode toggle. You can combine `isHidden` with `default` to force your docs to only use light or dark mode. For example:
103-
104132
<CodeGroup>
105133

106134
```json Only Dark Mode

0 commit comments

Comments
 (0)