@capsizecss/metrics
4.5.0 · 17 Nov 2026MIT472.5k / weekRepositorynpmAtom feed
30 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 4.x · latest line
4.5.0
17 Nov 2026Update Google Fonts — November 2026
Agrave Pro
Firjar
Minor Changes
Update Google Fonts — November 2026
New
Agrave Pro
Firjar
Redaction
Redaction 10
Redaction 100
Redaction 20
Redaction 35
Redaction 50
Redaction 70
Tiny5 Duo
Xmind
Updated
Castoro
Castoro Titling
Linefont
Namdhinggo
Noto Sans Mongolian
Scoutie Sans
Tiny5
Wavefont
Yomogi
4.4.0
15 Oct 2026Update Google Fonts — October 2026
Clarity City
Isometra
Minor Changes
Update Google Fonts — October 2026
New
Clarity City
Isometra
Kripa
Libre Caslon Condensed
Updated
Akshar
4.3.0
15 Sep 2026Update Google Fonts — September 2026
Asap Sharp
Caacupe One
Minor Changes
Update Google Fonts — September 2026
New
Asap Sharp
Caacupe One
Scoutie Sans
Valley Sans
Updated
Ma Shan Zheng
4.2.0
20 Jul 2026Update Google Fonts — July 2026
Geist Pixel
Geomini
Minor Changes
Update Google Fonts — July 2026
New
Geist Pixel
Geomini
Hibur Mono
Montenegrin Gothic One
Yuyu
Yuyu Short
Updated
EB Garamond
4.1.0
15 Jun 2026Update Google Fonts — June 2026
Alien Block
Pliant
4.0.0
18 May 2026- Breaking
Update Google Fonts — May 2026
BREAKING CHANGE: 2 fonts were removed due to no longer being available in the Google Fonts library (see list below).
- 3.x
3.7.0
17 Mar 2026Update Google Fonts
3.6.2
13 Nov 2025metrics: Fix font metric types
3.6.0
6 Nov 2025Update Google Fonts
3.5.0
31 Mar 2025Update Google Fonts
3.4.0
13 Nov 2024Update Google Fonts
3.3.0
15 Sep 2024Update Google Fonts to latest
3.2.0
23 May 2024metrics: Add weight and italic support
Add support for importing metrics for specific weights and italics.
While internal font metrics typically do not differ between variants, thexWidthAvgmetric is calculated based on the average character width, and this will differ between variants.Available variants will differ by font, and follow the same variant naming as Google Fonts:
import arial from '@capsizecss/metrics/arial'; import arialItalic from '@capsizecss/metrics/arial/italic'; import arialBold from '@capsizecss/metrics/arial/700'; import arialBoldItalic from '@capsizecss/metrics/arial/700italic';
Having metrics for different variants improves visual alignment of fallback fonts when using the
createFontStackAPI from the@capsizecss/corepackage.Example usage:
import { createFontStack } from '@capsizecss/core'; import montserrat from '@capsizecss/metrics/montserrat'; import montserrat600 from '@capsizecss/metrics/montserrat/600'; import arial from '@capsizecss/metrics/arial'; import arialBold from '@capsizecss/metrics/arial/700'; const regular = createFontStack([montserrat, arial]); // => { // "fontFamily": "Montserrat, \"Montserrat Fallback\", Arial", // "fontFaces": [ // { // "@font-face": { // "fontFamily": "\"Montserrat Fallback\"", // "src": "local('Arial'), local('ArialMT')", // "ascentOverride": "85.7923%", // "descentOverride": "22.2457%", // "lineGapOverride": "0%", // "sizeAdjust": "112.8307%" // } // } // ] // } const bold = createFontStack([montserrat600, arialBold], { fontFaceProperties: { fontWeight: 700, }, }); // => { // "fontFamily": "Montserrat, \"Montserrat Fallback\", Arial", // "fontFaces": [ // { // "@font-face": { // "fontWeight": 700, // "fontFamily": "\"Montserrat Fallback\"", // "src": "local('Arial Bold'), local('Arial-BoldMT')", // "ascentOverride": "89.3502%", // "descentOverride": "23.1683%", // "lineGapOverride": "0%", // "sizeAdjust": "108.3377%" // } // } // ] // }
3.1.0
5 May 2024Extract and expose
postscriptNameandfullNamefrom font metricsThe font metrics returned now include the
postscriptNameandfullNameproperties as authored by the font creator.For example:
// Arial Regular metrics { "familyName": "Arial", "fullName": "Arial", "postscriptName": "ArialMT", ... } // Arial Bold metrics { "familyName": "Arial", "fullName": "Arial Bold", "postscriptName": "Arial-BoldMT", ... }These values are particularly useful when constructing CSS
@font-facedeclarations, as they can be used to specify local(<font-face-name>) sources.
MDN recommends using both “to assure proper matching across platforms”.@font-face { font-family: 'Web Font Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 700; ascent-override: 89.3502%; descent-override: 23.1683%; size-adjust: 108.3377%; }
3.0.0
15 Apr 2024- Breaking
metrics: Prefer public family name to internal
familyNamemetricsEnsure metrics are available using the public family name as seen on Google Fonts as opposed to the internal family name metric.
This makes sense as consumers are looking to import the metrics relevant to a specific system font or from Google Fonts (also aligns with the names Google use in their font declarations generated in the hosted stylesheets). Update Google Fonts to latest
metrics: Update apple system font metrics
Previously the metrics provided for
-apple-systemandBlinkMacSystemFontwere extracted from theSF Profont, with a custom override to correct thedescentmetric.Through work to support metrics for different font weights and styles, it was identified that MacOS uses the
SFNSfont.
Extracting the metrics from this font means no more custom overrides, and will now enable using this font as a fallback via postscript name soon too.
- 2.x
2.2.0
8 Mar 2024xWidthAvg: 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.
2.1.1
5 Mar 2024xWidthAvg: Improve metric by factoring in space to weightings
Analyzing the
xWidthAvgmetrics forlatincharacter sets, we have seen further improvement in the accuracy by factoring in the space character to the weightings.
2.1.0
27 Feb 2024metrics: Provide ESM entrypoints for individual font metrics
Build an ESM version of individual font metrics in preparation for adding named exports as part of the upcoming support for non-latin unicode subsets.
2.0.0
16 Feb 2024- Breaking
Precompile Capsize packages with [Crackle]
Migrating Capsize packages to be precompiled with [Crackle], with a key change being Crackle now handles entry points instead of [Preconstruct].
Other benefits include:
xWidthAvg: Update character frequency weightings data source
The character frequency weightings used to calculate the
xWidthAvgmetrics were previously hard coded internally, and were an adaption from a [frequency table] from Wikipedia.We now generate these weightings based on the abstracts from [WikiNews] articles.
This makes it possible to add support for languages that use non-latin [unicode subsets], e.g. Thai, by adding the relevant abstract and generating thexAvgWidthbased on the corresponding unicode subset range.
- 1.x
1.3.0
1 Jan 2024Update Google Fonts to latest
entireMetricsCollection: Sort metrics by familyName
Sort the metrics collection by
familyName. Provides a nicer experience by default when looping over the dataset, while also improving the review DX when adding/editing metrics.
1.2.0
7 Jun 2023Update Google Fonts to latest
1.1.1
25 Feb 2023Ensure metrics files are published to npm
1.1.0
19 Feb 2023fontFamilyToCamelCase: Expose utility to convert family name to import name
A helper function to support tooling that needs to convert the font family name to the correct casing for the relevant metrics import.
import { fontFamilyToCamelCase } from '@capsizecss/metrics'; const familyName = fontFamilyToCamelCase('--apple-system'); // => `appleSystem` const metrics = await import(`@capsizecss/metrics/${familyName}`);entireMetricsCollection: Expose all metrics indexed by family name
Provides the entire metrics collection as a JSON object, keyed by font family name.
⚠️ CAUTION: Importing this will result in a large JSON structure being pulled into your project!
It is not recommended to use this client side.
import { entireMetricsCollection } from '@capsizecss/metrics/entireMetricsCollection'; const metrics = entireMetricsCollection['arial'];
1.0.1
1 Feb 2023oxygen: Refine missing metrics
Refines the missing
capHeightandxHeightmetrics to align with anchor co-ordinates of relevant glyphs —Hfor capHeight andxfor xHeight. Previously these values where subjectively observed using the Capsize website.Add more system fonts
Expands the metrics library to include more system fonts. Fonts added are:
The library now support all the Best Web Safe Fonts.
1.0.0
31 Jan 2023- Breaking
Metrics, unpack: Cut v1 release
No actual breaking change here, but cutting the v1 release to mark the packages moving out of experimental phase.
Update Google Fonts
Calculate and expose
xWidthAvg, the average width of lowercase characters.
Major Changes
- Breaking
Metrics, unpack: Cut v1 release
No actual breaking change here, but cutting the v1 release to mark the packages moving out of experimental phase.
Minor Changes
Update Google Fonts
Calculate and expose
xWidthAvg, the average width of lowercase characters.Add
categoryfield to describe the style of the font, e.g. “serif”, “sans-serif” etc.Exposes the
categoryfield captured by Google Fonts, manually populating it for system fonts.
- 0.4.x
0.4.0
11 Nov 2022Update Google Fonts to latest
Add
timesNewRomanmetricsProvides metrics for the built in system font
Times New Roman.
Can be used by importing as@capsizecss/metrics/timesNewRoman.
- 0.3.x
0.3.0
11 Jul 2022Update Google Fonts to latest
- 0.2.x
0.2.0
23 Mar 2022Expose
xHeightmetadata when availablemetrics: Ensure generated types reflect extracted metadata
The constructed types will now align with the metadata available from the font itself. This will ensure that TypeScript consumers receieve build time feedback for incomplete metrics, allowing manual overrides to complete the required FontMetric data.
metrics: Update Google Fonts to latest
- 0.1.x
0.1.0
24 Sep 2021Initial release
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.