You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/fonts.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,23 +6,27 @@ easy to do so.
6
6
7
7
## Using Custom Fonts
8
8
9
-
For custom fonts, Epic Stack uses [`fontless`](https://github.com/unjs/fontaine/tree/main/packages/fontless) for automatic font optimization. This provides zero-runtime font loading with proper fallbacks to reduce Cumulative Layout Shift (CLS).
9
+
For custom fonts, Epic Stack uses
10
+
[`fontless`](https://github.com/unjs/fontaine/tree/main/packages/fontless) for
11
+
automatic font optimization. This provides zero-runtime font loading with proper
12
+
fallbacks to reduce Cumulative Layout Shift (CLS).
10
13
11
14
## How it works
12
15
13
16
Simply use font families in your CSS and `fontless` handles the rest:
14
17
15
18
```css
16
19
.font-title {
17
-
font-family: "Poppins", sans-serif;
20
+
font-family: 'Poppins', sans-serif;
18
21
}
19
22
20
23
.body-text {
21
-
font-family: "Inter", sans-serif;
24
+
font-family: 'Inter', sans-serif;
22
25
}
23
26
```
24
27
25
28
The plugin will:
29
+
26
30
- Detect font-family declarations in your CSS
27
31
- Resolve fonts from providers (Google Fonts, Bunny Fonts, etc.)
28
32
- Generate optimized `@font-face` declarations
@@ -32,5 +36,7 @@ The plugin will:
32
36
## Troubleshooting
33
37
34
38
### Fonts not loading in development
35
-
This is expected behavior. Fonts are only generated in the build files. To see fonts in development mode, build the application first and then run `npm run dev`.
36
39
40
+
This is expected behavior. Fonts are only generated in the build files. To see
41
+
fonts in development mode, build the application first and then run
0 commit comments