Gathering detailed insights and metrics for @capsizecss/unpack
Gathering detailed insights and metrics for @capsizecss/unpack
Gathering detailed insights and metrics for @capsizecss/unpack
Gathering detailed insights and metrics for @capsizecss/unpack
npm install @capsizecss/unpack
Typescript
Module System
Min. Node Version
Node Version
NPM Version
@capsizecss/unpack@3.0.0
Updated on Jul 01, 2025
@capsizecss/vanilla-extract@2.0.1
Updated on May 29, 2025
@capsizecss/unpack@2.4.0
Updated on Mar 31, 2025
@capsizecss/metrics@3.5.0
Updated on Mar 31, 2025
@capsizecss/metrics@3.4.0
Updated on Nov 13, 2024
@capsizecss/metrics@3.3.0
Updated on Sep 15, 2024
TypeScript (92.21%)
CSS (5.96%)
JavaScript (1.76%)
HTML (0.05%)
Shell (0.03%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
1,617 Stars
232 Commits
43 Forks
10 Watchers
11 Branches
24 Contributors
Updated on Jul 11, 2025
Latest Version
3.0.0
Package Id
@capsizecss/unpack@3.0.0
Unpacked Size
29.65 kB
Size
5.92 kB
File Count
7
NPM Version
10.2.4
Node Version
20.11.0
Published on
Jul 01, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
6
Unpack the capsize font metrics directly from a font file.
1npm install @capsizecss/unpack
fromBuffer
Takes a buffer and returns the resolved font metrics.
1import { fromBuffer } from '@capsizecss/unpack'; 2 3const metrics = await fromBuffer(buffer);
fromBlob
Takes a file blob and returns the resolved font metrics.
1import { fromBlob } from '@capsizecss/unpack'; 2 3const metrics = await fromBlob(file);
fromUrl
Takes a url string and returns the resolved font metrics.
1import { fromUrl } from '@capsizecss/unpack'; 2 3const metrics = await fromUrl(url);
fromFile
Takes a file path string and returns the resolved font metrics.
1import { fromFile } from '@capsizecss/unpack'; 2 3const metrics = await fromFile(filePath);
All of the above APIs accept an optional second parameter with the following options:
postscriptName
Capsize can extract the metrics for a single font from a TrueType Collection (TTC) file by providing the postscriptName
.
1import { fromFile } from '@capsizecss/unpack'; 2 3const metrics = await fromFile('AvenirNext.ttc', { 4 postscriptName: 'AvenirNext-Bold', 5});
The font metrics object returned contains the following properties:
Property | Type | Description |
---|---|---|
familyName | string | The font’s family name as authored by font creator |
fullName | string | The font’s full name as authored by font creator |
postscriptName | string | The font’s unique PostScript name as authored by font creator |
category | string | The style of the font: serif, sans-serif, monospace, display, or handwriting. |
capHeight | number | The height of capital letters above the baseline |
ascent | number | The height of the ascenders above baseline |
descent | number | The descent of the descenders below baseline |
lineGap | number | The amount of space included between lines |
unitsPerEm | number | The size of the font’s internal coordinate grid |
xHeight | number | The height of the main body of lower case letters above baseline |
xWidthAvg | number | The average width of character glyphs in the font for the selected unicode subset. Calculated based on character frequencies in written text, falling back to the built in xAvgCharWidth from the OS/2 table. |
subsets | { [subset]: { xWidthAvg: number } } | A lookup of the xWidthAvg metric by subset (see supported subsets) |
MIT.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
54 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More