Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capsizecss/unpack

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capsizecss/unpack - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

149

dist/index.d.ts
import { Font as Font$1 } from 'fontkit';
declare const _default: {
latin: {
"0": number;
"1": number;
"2": number;
"3": number;
"4": number;
"5": number;
"6": number;
"7": number;
"8": number;
"9": number;
",": number;
" ": number;
t: number;
h: number;
e: number;
o: number;
f: number;
P: number;
p: number;
l: number;
"'": number;
s: number;
R: number;
u: number;
b: number;
i: number;
c: number;
C: number;
n: number;
a: number;
d: number;
y: number;
w: number;
B: number;
r: number;
z: number;
G: number;
j: number;
T: number;
".": number;
L: number;
k: number;
m: number;
"]": number;
J: number;
F: number;
v: number;
g: number;
A: number;
N: number;
"-": number;
H: number;
D: number;
M: number;
I: number;
E: number;
"\"": number;
S: number;
"(": number;
")": number;
x: number;
W: number;
Q: number;
Y: number;
q: number;
V: number;
á: number;
K: number;
U: number;
"=": number;
"[": number;
O: number;
é: number;
$: number;
":": number;
"|": number;
"/": number;
"%": number;
Z: number;
";": number;
X: number;
};
thai: {
ส: number;
ว: number;
น: number;
บ: number;
จ: number;
า: number;
ก: number;
เ: number;
ร: number;
ม: number;
ค: number;
ำ: number;
ข: number;
อ: number;
ป: number;
ด: number;
ใ: number;
ภ: number;
ท: number;
พ: number;
ฤ: number;
ษ: number;
ศ: number;
ะ: number;
ช: number;
แ: number;
ล: number;
ง: number;
ย: number;
ห: number;
ฝ: number;
ต: number;
โ: number;
ญ: number;
ณ: number;
ผ: number;
ไ: number;
ฯ: number;
ฟ: number;
ธ: number;
ถ: number;
ฐ: number;
ซ: number;
ฉ: number;
ฑ: number;
ฆ: number;
ฬ: number;
ฏ: number;
ฎ: number;
ฒ: number;
ๆ: number;
ฮ: number;
"\u0E52": number;
"\u0E55": number;
};
};
type SupportedSubsets = keyof typeof _default;
declare const supportedSubsets: ("latin" | "thai")[];
declare const unpackMetricsFromFont: (font: Font$1) => {

@@ -12,2 +156,5 @@ familyName: string;

xWidthAvg: number;
subsets: Record<"latin" | "thai", {
xWidthAvg: number;
}>;
};

@@ -19,2 +166,2 @@ type Font = ReturnType<typeof unpackMetricsFromFont>;

export { type Font, fromBlob, fromFile, fromUrl };
export { type Font, type SupportedSubsets, fromBlob, fromFile, fromUrl, supportedSubsets };

2

package.json
{
"name": "@capsizecss/unpack",
"version": "2.0.1",
"version": "2.1.0",
"description": "Unpack capsize font metrics from fonts",

@@ -5,0 +5,0 @@ "keywords": [

@@ -48,13 +48,18 @@ <img src="https://raw.githubusercontent.com/seek-oss/capsize/HEAD/images/capsize-header.png" alt="Capsize" title="Capsize" width="443px" />

| Property | Type | Description |
| ---------- | ------ | ----------------------------------------------------------------------------------------------------------------- |
| familyName | string | The font family name as authored by font creator |
| 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 lowercase characters. Currently derived from latin character frequencies in English language |
| Property | Type | Description |
| ---------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| familyName | string | The font family 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 | {<br/>[subset]: { xWidthAvg: number }<br/>} | A lookup of the `xWidthAvg` metric by subset (see [supported subsets]) |
[based on character frequencies in written text]: ../metrics/README.md#how-xwidthavg-is-calculated
[supported subsets]: ../metrics/README.md#subsets
## Thanks

@@ -61,0 +66,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc