@liiift-studio/sanity-font-manager 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -0
- package/dist/index.mjs +10 -0
- package/package.json +2 -2
- package/src/schema/cedarsProfileField.js +9 -0
- package/src/utils/computeCedarsProfile.js +3 -2
package/dist/index.js
CHANGED
|
@@ -8591,6 +8591,7 @@ function computeCedarsProfile(buffer) {
|
|
|
8591
8591
|
return {
|
|
8592
8592
|
scores: profile.scores,
|
|
8593
8593
|
labels: profile.labels,
|
|
8594
|
+
availability: profile.availability,
|
|
8594
8595
|
plus: profile.plus,
|
|
8595
8596
|
vector: profile.vector
|
|
8596
8597
|
};
|
|
@@ -18524,6 +18525,15 @@ var cedarsProfileField = {
|
|
|
18524
18525
|
options: { collapsible: true, collapsed: true },
|
|
18525
18526
|
fields: labelFields
|
|
18526
18527
|
},
|
|
18528
|
+
{
|
|
18529
|
+
// Per-axis measurability: false means the axis could not be measured for
|
|
18530
|
+
// this font (a 0 score is a placeholder, not a real low reading).
|
|
18531
|
+
title: "Availability",
|
|
18532
|
+
name: "availability",
|
|
18533
|
+
type: "object",
|
|
18534
|
+
options: { collapsible: true, collapsed: true },
|
|
18535
|
+
fields: AXES.map((key) => ({ title: titleCase(key), name: key, type: "boolean" }))
|
|
18536
|
+
},
|
|
18527
18537
|
{
|
|
18528
18538
|
title: "+ Descriptors",
|
|
18529
18539
|
name: "plus",
|
package/dist/index.mjs
CHANGED
|
@@ -8596,6 +8596,7 @@ function computeCedarsProfile(buffer) {
|
|
|
8596
8596
|
return {
|
|
8597
8597
|
scores: profile.scores,
|
|
8598
8598
|
labels: profile.labels,
|
|
8599
|
+
availability: profile.availability,
|
|
8599
8600
|
plus: profile.plus,
|
|
8600
8601
|
vector: profile.vector
|
|
8601
8602
|
};
|
|
@@ -18419,6 +18420,15 @@ var cedarsProfileField = {
|
|
|
18419
18420
|
options: { collapsible: true, collapsed: true },
|
|
18420
18421
|
fields: labelFields
|
|
18421
18422
|
},
|
|
18423
|
+
{
|
|
18424
|
+
// Per-axis measurability: false means the axis could not be measured for
|
|
18425
|
+
// this font (a 0 score is a placeholder, not a real low reading).
|
|
18426
|
+
title: "Availability",
|
|
18427
|
+
name: "availability",
|
|
18428
|
+
type: "object",
|
|
18429
|
+
options: { collapsible: true, collapsed: true },
|
|
18430
|
+
fields: AXES.map((key) => ({ title: titleCase(key), name: key, type: "boolean" }))
|
|
18431
|
+
},
|
|
18422
18432
|
{
|
|
18423
18433
|
title: "+ Descriptors",
|
|
18424
18434
|
name: "plus",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liiift-studio/sanity-font-manager",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "Sanity Studio plugin — full font management suite with batch upload, format conversion, metadata extraction, CSS generation, collection/pair generation, and script variant support. Supports Sanity v3, v4, and v5.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Liiift Studio",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"link:all": "npm link && cd ../../../sites/darden/sanity && npm link @liiift-studio/sanity-font-manager && cd ../../tdf/sanity && npm link @liiift-studio/sanity-font-manager && cd ../../mckl/cms && npm link @liiift-studio/sanity-font-manager"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@liiift-studio/cedars-engine": "^
|
|
53
|
+
"@liiift-studio/cedars-engine": "^2.0.0",
|
|
54
54
|
"base-64": "^1.0.0",
|
|
55
55
|
"lib-font": "^3.0.1",
|
|
56
56
|
"nanoid": "^5.0.0",
|
|
@@ -47,6 +47,15 @@ export const cedarsProfileField = {
|
|
|
47
47
|
options: { collapsible: true, collapsed: true },
|
|
48
48
|
fields: labelFields,
|
|
49
49
|
},
|
|
50
|
+
{
|
|
51
|
+
// Per-axis measurability: false means the axis could not be measured for
|
|
52
|
+
// this font (a 0 score is a placeholder, not a real low reading).
|
|
53
|
+
title: 'Availability',
|
|
54
|
+
name: 'availability',
|
|
55
|
+
type: 'object',
|
|
56
|
+
options: { collapsible: true, collapsed: true },
|
|
57
|
+
fields: AXES.map((key) => ({ title: titleCase(key), name: key, type: 'boolean' })),
|
|
58
|
+
},
|
|
50
59
|
{
|
|
51
60
|
title: '+ Descriptors',
|
|
52
61
|
name: 'plus',
|
|
@@ -5,14 +5,15 @@ import { analyzeFont } from '@liiift-studio/cedars-engine';
|
|
|
5
5
|
/**
|
|
6
6
|
* Compute the CEDARS+ profile (Contrast, Energy, Details, Axis, Rhythm, Structure)
|
|
7
7
|
* for a font from its raw outline geometry.
|
|
8
|
-
* @param {ArrayBuffer} buffer - The font file bytes (OTF/TTF/WOFF).
|
|
9
|
-
* @returns {{ scores: object, labels: object, plus: object, vector: number[] }}
|
|
8
|
+
* @param {ArrayBuffer|Uint8Array} buffer - The font file bytes (OTF/TTF/WOFF; not WOFF2).
|
|
9
|
+
* @returns {{ scores: object, labels: object, availability: object, plus: object, vector: number[] }}
|
|
10
10
|
*/
|
|
11
11
|
export function computeCedarsProfile(buffer) {
|
|
12
12
|
const profile = analyzeFont(buffer);
|
|
13
13
|
return {
|
|
14
14
|
scores: profile.scores,
|
|
15
15
|
labels: profile.labels,
|
|
16
|
+
availability: profile.availability,
|
|
16
17
|
plus: profile.plus,
|
|
17
18
|
vector: profile.vector,
|
|
18
19
|
};
|