File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ module.exports = {
113
113
114
114
115
115
<details >
116
- <summary >SveltKit </summary ><br >
116
+ <summary >SvelteKit </summary ><br >
117
117
118
118
``` ts
119
119
// vite.config.ts
462
462
/// <reference types = " unplugin-fonts/client" />
463
463
```
464
464
465
- ## Ressources
465
+ ## Resources
466
466
467
467
- https://web.dev/optimize-webfont-loading/
468
468
- https://csswizardry.com/2020/05/the-fastest-google-fonts/
Original file line number Diff line number Diff line change @@ -108,13 +108,18 @@ export interface CustomFonts {
108
108
stripPrefix ?: string
109
109
}
110
110
111
- export interface FontsourceFontFamily {
111
+ interface BaseFontsourceFontFamily {
112
112
name : string
113
- variables ?: ( 'variable' | 'variable-italic' | 'variable-full' | 'variable-full-italic' ) [ ]
114
- weights : ( 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 ) [ ]
115
113
styles ?: ( 'italic' | 'normal' ) [ ]
116
114
subset ?: string
117
115
}
116
+ interface WeightsFontsourceFontFamily extends BaseFontsourceFontFamily {
117
+ weights : ( 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 ) [ ]
118
+ }
119
+ interface VariableFontsourceFontFamily extends BaseFontsourceFontFamily {
120
+ variables : ( 'variable' | 'variable-italic' | 'variable-full' | 'variable-full-italic' ) [ ]
121
+ }
122
+ export type FontsourceFontFamily = WeightsFontsourceFontFamily | VariableFontsourceFontFamily
118
123
export interface FontsourceFonts {
119
124
families : ( string | FontsourceFontFamily ) [ ]
120
125
}
You can’t perform that action at this time.
0 commit comments