Packages

@capsizecss/metrics

4.5.0 · 17 Nov 2026MIT472.5k / weekRepositorynpmAtom feed

Your version

3.1.0

5 May 2024Where it was published

3.7.0 is the newest release of 3.x.

In short

1 new

Release note

Minor Changes

  • Extract and expose postscriptName and fullName from font metrics

    The font metrics returned now include the postscriptName and fullName properties 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-face declarations, 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%;
    }

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.