@capsizecss/core
4.1.3 · 12 Nov 2025MIT205.9k / weekRepositoryHomepagenpmAtom feed
Your version
4.1.3 is the newest release of 4.x.
In short
1 new
Release note
Minor Changes
xWidthAvg: Add
subsetsupport for non-latin character setsPreviously the
xWidthAvgmetric was calculated based on the character frequency as measured from English text only.
This resulted in thexWidthAvgmetric being incorrect for languages that use a different unicode subset range, e.g. Thai.Supporting Thai now enables adding support for other unicode ranges in the future.
What's changed?
The `subsets` field has been added to the metrics object, providing the `xWidthAvg` metric for each subset — calculated against the relevant character frequency data.
```diff
{
"familyName": "Abril Fatface",
...
+ "subsets": {
+ "latin": {
+ "xWidthAvg": 512
+ },
+ "thai": {
+ "xWidthAvg": 200
+ }
+ }
}
```
There are no changes to any of the other existing metrics.Fallback font stacks can now be generated per subset, allowing the correct `xWidthAvg` metric to be used for the relevant subset.
The `createFontStack` API now accepts `subset` as an option:
```ts
const { fontFamily, fontFaces } = createFontStack([lobster, arial], {
subset: 'thai',
});
```A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.