fontaine 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -8
- package/dist/capsize-font-metrics.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{metrics-R5FQ6W30.mjs → metrics-CiOgR8am.mjs} +33 -10
- package/dist/{metrics-DjL28VHB.cjs → metrics-Lob9PLg0.cjs} +33 -10
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.mjs +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -183,9 +183,9 @@ const options = {
|
|
|
183
183
|
|
|
184
184
|
### Default Category Fallbacks
|
|
185
185
|
|
|
186
|
-
- **sans-serif**: `Segoe UI`, `Helvetica Neue`, `Arial`, `Noto Sans`
|
|
187
|
-
- **serif**: `Times New Roman`, `Georgia`, `Noto Serif`
|
|
188
|
-
- **monospace**: `Courier New`, `Roboto Mono`, `Noto Sans Mono`
|
|
186
|
+
- **sans-serif**: `Segoe UI`, `Helvetica Neue`, `Arial`, `Noto Sans`, `Liberation Sans`
|
|
187
|
+
- **serif**: `Times New Roman`, `Georgia`, `Noto Serif`, `Liberation Serif`
|
|
188
|
+
- **monospace**: `Courier New`, `Roboto Mono`, `Noto Sans Mono`, `Liberation Mono`
|
|
189
189
|
- **display** & **handwriting**: Same as sans-serif
|
|
190
190
|
|
|
191
191
|
> **Note:** These presets are available programmatically via `DEFAULT_CATEGORY_FALLBACKS` and can be used with the `resolveCategoryFallbacks` helper function for advanced use cases. Both are exported from the `fontaine` package and shared across related packages (e.g., `fontless`) to ensure consistent fallback behavior.
|
|
@@ -226,15 +226,26 @@ Example:
|
|
|
226
226
|
format('woff');
|
|
227
227
|
font-weight: 700;
|
|
228
228
|
}
|
|
229
|
-
/*
|
|
229
|
+
/* One additional font-face declaration per fallback font will be added to your CSS. */
|
|
230
230
|
@font-face {
|
|
231
231
|
font-family: 'Roboto fallback';
|
|
232
|
-
src: local('Segoe UI'), local('
|
|
233
|
-
local('
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
src: local('Segoe UI'), local('Segoe UI Regular'), local('SegoeUI-Regular'),
|
|
233
|
+
local('SegoeUI');
|
|
234
|
+
size-adjust: 100.3304%;
|
|
235
|
+
ascent-override: 92.4679%;
|
|
236
|
+
descent-override: 24.3337%;
|
|
236
237
|
line-gap-override: 0%;
|
|
237
238
|
}
|
|
239
|
+
@font-face {
|
|
240
|
+
font-family: 'Roboto fallback';
|
|
241
|
+
src: local('Arial'), local('Arial Regular'), local('Arial-Regular'),
|
|
242
|
+
local('ArialMT');
|
|
243
|
+
size-adjust: 99.7809%;
|
|
244
|
+
ascent-override: 92.9771%;
|
|
245
|
+
descent-override: 24.4677%;
|
|
246
|
+
line-gap-override: 0%;
|
|
247
|
+
}
|
|
248
|
+
/* ... */
|
|
238
249
|
```
|
|
239
250
|
|
|
240
251
|
Then, whenever you use `font-family: 'Roboto'`, `fontaine` will add the fallback to the font-family:
|