@kriya-ai/harness 0.2.4 → 2.0.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/RELEASE_NOTES.md +121 -0
- package/SAFETY.md +181 -0
- package/THIRD_PARTY_NOTICES.md +113 -0
- package/bin/kriya.js +188 -2
- package/bundle/cordis.patch.yml +49 -0
- package/contract/SOURCE.md +3 -3
- package/contract/contract.json +504 -3
- package/contract/schemas/api.json +64 -0
- package/contract/schemas/auth_matrix.json +44 -0
- package/contract/schemas/component_states.json +33 -0
- package/contract/schemas/design_tokens.json +34 -0
- package/contract/schemas/scene_direction.json +82 -0
- package/contract/schemas/threat_model.json +44 -0
- package/package.json +2 -1
- package/plugins/changes/client.js +5 -3
- package/plugins/deploy/index.js +215 -0
- package/plugins/deploy/package.json +13 -0
- package/plugins/grounding/index.js +81 -0
- package/plugins/grounding/lookup.js +373 -0
- package/plugins/grounding/package.json +13 -0
- package/plugins/kriya-tools/index.js +2 -1
- package/plugins/loop/index.js +376 -10
- package/plugins/mcp/index.js +79 -0
- package/plugins/mcp/package.json +13 -0
- package/plugins/mirror/index.js +17 -0
- package/plugins/overview/client.js +5 -2
- package/plugins/preview/client.js +12 -6
- package/plugins/progress/client.js +7 -4
- package/plugins/repo/index.js +230 -0
- package/plugins/repo/package.json +13 -0
- package/plugins/repo/repo.js +348 -0
- package/plugins/runstrip/client.js +426 -0
- package/plugins/runstrip/index.js +301 -0
- package/plugins/runstrip/package.json +23 -0
- package/src/cartridges.js +133 -0
- package/src/contracts.js +130 -0
- package/src/critic.js +78 -0
- package/src/daemon.js +7 -1
- package/src/doctor.js +67 -0
- package/src/edit/core/effects.js +185 -0
- package/src/edit/core/ffmpeg.js +82 -5
- package/src/edit/core/layout.js +46 -1
- package/src/edit/core/ops.js +175 -3
- package/src/edit/core/plan.js +95 -9
- package/src/edit/core/project.d.ts +24 -0
- package/src/edit/core/project.js +64 -0
- package/src/edit/core/solver.js +34 -6
- package/src/edit/core/style-brief.js +211 -0
- package/src/edit/core/style-packs.js +57 -0
- package/src/edit/core/transitions.js +17 -0
- package/src/edit/core/type-kit.js +173 -0
- package/src/edit/director/ask.js +37 -3
- package/src/edit/director/assembly.js +829 -0
- package/src/edit/director/continuity.js +137 -0
- package/src/edit/director/custom-motion.js +88 -0
- package/src/edit/director/graphics.js +186 -0
- package/src/edit/director/intent.js +125 -0
- package/src/edit/director/mentions.js +52 -0
- package/src/edit/director/plan.js +89 -12
- package/src/edit/director/revise.js +172 -7
- package/src/edit/director/viewer.js +136 -0
- package/src/edit/director/watch-fix.js +119 -0
- package/src/edit/engine/captions.js +110 -5
- package/src/edit/engine/confine.js +81 -4
- package/src/edit/engine/custom.js +243 -0
- package/src/edit/engine/dna2.js +893 -0
- package/src/edit/engine/fonts.js +218 -0
- package/src/edit/engine/graphics.js +439 -0
- package/src/edit/engine/index.js +14 -5
- package/src/edit/engine/motion.js +153 -14
- package/src/edit/engine/music-bed.js +59 -1
- package/src/edit/engine/packs.js +11 -0
- package/src/edit/engine/reference2.js +26 -0
- package/src/edit/engine/sfx.js +56 -1
- package/src/edit/engine/tool.js +21 -5
- package/src/edit/gates/assembly.js +194 -0
- package/src/edit/gates/copy.js +7 -4
- package/src/edit/gates/index.js +76 -8
- package/src/edit/gates/picture.js +6 -3
- package/src/edit/gates/reference.js +115 -0
- package/src/edit/gates/tile.js +96 -0
- package/src/edit/host/client.js +4 -3
- package/src/edit/host/clips.js +33 -0
- package/src/edit/host/jobs.js +9 -3
- package/src/edit/host/layers.js +134 -0
- package/src/edit/host/main.js +17 -7
- package/src/edit/host/paths.js +34 -3
- package/src/edit/host/preview.js +108 -0
- package/src/edit/host/projects.js +494 -29
- package/src/edit/host/server.js +263 -19
- package/src/edit/host/tavi.js +77 -0
- package/src/edit/loop/make.js +44 -3
- package/src/edit/recipes/assembly.js +352 -0
- package/src/edit/recipes/graphic-clips.js +59 -0
- package/src/edit/recipes/openings.js +36 -0
- package/src/edit/recipes/reel.js +138 -17
- package/src/edit/recipes/reference-look.js +29 -0
- package/src/edit/recipes/short-from-long.js +3 -3
- package/src/edit/recipes/sound.js +71 -0
- package/src/edit/runtime/cli.js +26 -5
- package/src/edit/runtime/fetch.js +4 -3
- package/src/edit/runtime/licences.js +7 -1
- package/src/explore.js +103 -0
- package/src/failure.js +1 -1
- package/src/gate-commands.js +114 -0
- package/src/gates/api.js +127 -0
- package/src/gates/commands.js +111 -0
- package/src/gates/detectors.js +370 -0
- package/src/gates/http.js +62 -0
- package/src/gates/index.js +196 -0
- package/src/gates/page.js +264 -0
- package/src/gates/sast.js +64 -0
- package/src/gates/stack.js +110 -0
- package/src/gates/tenant.js +162 -0
- package/src/gates/three.js +407 -0
- package/src/gates/ui.js +111 -0
- package/src/launch.js +15 -3
- package/src/loop.js +199 -7
- package/src/mcp.js +126 -0
- package/src/milestones.js +188 -0
- package/src/modes.js +32 -0
- package/src/orchestra.js +43 -0
- package/src/outcomes.js +88 -0
- package/src/profiles.js +5 -0
- package/src/receipts.js +238 -0
- package/src/release.js +356 -0
- package/src/runstrip.js +122 -0
- package/src/stack.js +120 -0
- package/src/verify.js +67 -20
- package/studio/dist/fonts/fraunces.woff2 +0 -0
- package/studio/dist/fonts/geist.woff2 +0 -0
- package/studio/dist/fonts/jetbrains-mono.woff2 +0 -0
- package/studio/dist/studio.css +452 -3
- package/studio/dist/studio.js +3 -3
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
// Fonts that ship (TP7, CRAFT_UPGRADE §5.1, EDD-67): the Media Runtime's pack-fonts, each
|
|
2
|
+
// file pinned by hash in the signed manifest and licensed OFL-1.1 (checked per item, EQ-18).
|
|
3
|
+
// A composition names a font by id only (`url("kriya-font:<id>")`); the renderer puts the
|
|
4
|
+
// file in as data, so the same tile draws the same on every computer and in the Studio, and
|
|
5
|
+
// a computer without the pack keeps the system stacks, with a note, never a failed make.
|
|
6
|
+
// Script picks the font: each run of a line goes to a family that has it (EQ-17).
|
|
7
|
+
|
|
8
|
+
import { existsSync, readFileSync } from "node:fs"
|
|
9
|
+
import { join } from "node:path"
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The fonts this client knows, by the manifest's artifact id. `family` is the CSS name
|
|
13
|
+
* Kriya gives it; `scripts` what it is chosen for; `line` the line height its box needs; `system` the stack that stands in
|
|
14
|
+
* when the pack isn't installed. Data only: no path, URL or price.
|
|
15
|
+
*/
|
|
16
|
+
export const FONTS = {
|
|
17
|
+
"font-inter": { family: "Kriya Inter", role: "sans", scripts: ["latin"], line: 1.22, system: "'Helvetica Neue',Helvetica,Arial,sans-serif" },
|
|
18
|
+
"font-oswald": { family: "Kriya Oswald", role: "condensed", scripts: ["latin"], line: 1.49, system: "'Avenir Next Condensed','Arial Narrow','Helvetica Neue',Arial,sans-serif" },
|
|
19
|
+
"font-montserrat": { family: "Kriya Montserrat", role: "geometric", scripts: ["latin"], line: 1.22, system: "'Avenir Next',Futura,'Helvetica Neue',Arial,sans-serif" },
|
|
20
|
+
"font-lora": { family: "Kriya Lora", role: "serif", scripts: ["latin"], line: 1.28, system: "Georgia,'Times New Roman',serif" },
|
|
21
|
+
"font-jetbrains-mono": { family: "Kriya JetBrains Mono", role: "mono", scripts: ["latin"], line: 1.32, system: "'SF Mono',Menlo,Consolas,'Courier New',monospace" },
|
|
22
|
+
"font-caveat": { family: "Kriya Caveat", role: "hand", scripts: ["latin"], line: 1.26, system: "'Bradley Hand','Segoe Print','Comic Sans MS',cursive" },
|
|
23
|
+
"font-noto-sans-devanagari": { family: "Kriya Noto Sans Devanagari", role: "script", scripts: ["devanagari"], line: 1.31, system: "'Kohinoor Devanagari','Noto Sans Devanagari','Nirmala UI',sans-serif" },
|
|
24
|
+
"font-noto-sans-telugu": { family: "Kriya Noto Sans Telugu", role: "script", scripts: ["telugu"], line: 1.36, system: "'Kohinoor Telugu','Noto Sans Telugu','Nirmala UI',sans-serif" },
|
|
25
|
+
"font-noto-sans-tamil": { family: "Kriya Noto Sans Tamil", role: "script", scripts: ["tamil"], line: 1.24, system: "'Tamil Sangam MN','Noto Sans Tamil','Nirmala UI',sans-serif" },
|
|
26
|
+
"font-noto-sans-kannada": { family: "Kriya Noto Sans Kannada", role: "script", scripts: ["kannada"], line: 1.35, system: "'Kannada Sangam MN','Noto Sans Kannada','Nirmala UI',sans-serif" },
|
|
27
|
+
"font-noto-sans-malayalam": { family: "Kriya Noto Sans Malayalam", role: "script", scripts: ["malayalam"], line: 1.25, system: "'Malayalam Sangam MN','Noto Sans Malayalam','Nirmala UI',sans-serif" },
|
|
28
|
+
"font-noto-sans-bengali": { family: "Kriya Noto Sans Bengali", role: "script", scripts: ["bengali"], line: 1.33, system: "'Kohinoor Bangla','Noto Sans Bengali','Nirmala UI',sans-serif" },
|
|
29
|
+
"font-noto-sans-gujarati": { family: "Kriya Noto Sans Gujarati", role: "script", scripts: ["gujarati"], line: 1.31, system: "'Kohinoor Gujarati','Noto Sans Gujarati','Nirmala UI',sans-serif" },
|
|
30
|
+
"font-noto-sans-gurmukhi": { family: "Kriya Noto Sans Gurmukhi", role: "script", scripts: ["gurmukhi"], line: 1.31, system: "'Gurmukhi MN','Noto Sans Gurmukhi','Nirmala UI',sans-serif" },
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** The OFL-1.1 notice of each font, for THIRD_PARTY_NOTICES and the licence test (ET-LIC-01). */
|
|
34
|
+
export const FONT_LICENCES = {
|
|
35
|
+
"font-inter": "Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter)",
|
|
36
|
+
"font-oswald": "Copyright 2016 The Oswald Project Authors (https://github.com/googlefonts/OswaldFont)",
|
|
37
|
+
"font-montserrat": "Copyright 2024 The Montserrat.Git Project Authors (https://github.com/JulietaUla/Montserrat.git)",
|
|
38
|
+
"font-lora": "Copyright 2011 The Lora Project Authors (https://github.com/cyrealtype/Lora-Cyrillic), with Reserved Font Name \"Lora\".",
|
|
39
|
+
"font-jetbrains-mono": "Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)",
|
|
40
|
+
"font-caveat": "Copyright 2014 The Caveat Project Authors (https://github.com/googlefonts/caveat)",
|
|
41
|
+
"font-noto-sans-devanagari": "Copyright 2022 The Noto Project Authors (https://github.com/notofonts/devanagari)",
|
|
42
|
+
"font-noto-sans-telugu": "Copyright 2022 The Noto Project Authors (https://github.com/notofonts/telugu)",
|
|
43
|
+
"font-noto-sans-tamil": "Copyright 2022 The Noto Project Authors (https://github.com/notofonts/tamil)",
|
|
44
|
+
"font-noto-sans-kannada": "Copyright 2022 The Noto Project Authors (https://github.com/notofonts/kannada)",
|
|
45
|
+
"font-noto-sans-malayalam": "Copyright 2022 The Noto Project Authors (https://github.com/notofonts/malayalam)",
|
|
46
|
+
"font-noto-sans-bengali": "Copyright 2022 The Noto Project Authors (https://github.com/notofonts/bengali)",
|
|
47
|
+
"font-noto-sans-gujarati": "Copyright 2022 The Noto Project Authors (https://github.com/notofonts/gujarati)",
|
|
48
|
+
"font-noto-sans-gurmukhi": "Copyright 2022 The Noto Project Authors (https://github.com/notofonts/gurmukhi)",
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export const FONT_PACK = "pack-fonts"
|
|
52
|
+
|
|
53
|
+
/** The scripts a font is shipped for, in the order a mixed line's chain tries them. */
|
|
54
|
+
export const SCRIPTS = ["latin", "devanagari", "telugu", "tamil", "kannada", "malayalam", "bengali", "gujarati", "gurmukhi"]
|
|
55
|
+
const SCRIPT_TEST = {
|
|
56
|
+
latin: /\p{Script=Latin}/u,
|
|
57
|
+
devanagari: /\p{Script=Devanagari}/u,
|
|
58
|
+
telugu: /\p{Script=Telugu}/u,
|
|
59
|
+
tamil: /\p{Script=Tamil}/u,
|
|
60
|
+
kannada: /\p{Script=Kannada}/u,
|
|
61
|
+
malayalam: /\p{Script=Malayalam}/u,
|
|
62
|
+
bengali: /\p{Script=Bengali}/u,
|
|
63
|
+
gujarati: /\p{Script=Gujarati}/u,
|
|
64
|
+
gurmukhi: /\p{Script=Gurmukhi}/u,
|
|
65
|
+
}
|
|
66
|
+
const SHARED = /[\p{Script=Common}\p{Script=Inherited}]/u
|
|
67
|
+
/** The shipped font for each Indic script. */
|
|
68
|
+
export const SCRIPT_FONTS = Object.fromEntries(Object.entries(FONTS).filter(([, f]) => f.role === "script").map(([id, f]) => [f.scripts[0], id]))
|
|
69
|
+
|
|
70
|
+
/** One character's script: a shipped one, "common" (spaces, digits, marks shared by all) or "other". */
|
|
71
|
+
export function scriptOfChar(char) {
|
|
72
|
+
if (SHARED.test(char)) return "common"
|
|
73
|
+
return SCRIPTS.find((script) => SCRIPT_TEST[script].test(char)) ?? "other"
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A line as runs of one script each; shared characters join the run they sit in.
|
|
78
|
+
* @returns {{ script: string, text: string }[]}
|
|
79
|
+
*/
|
|
80
|
+
export function scriptRuns(text) {
|
|
81
|
+
const runs = []
|
|
82
|
+
let pending = ""
|
|
83
|
+
for (const char of String(text)) {
|
|
84
|
+
const script = scriptOfChar(char)
|
|
85
|
+
if (script === "common") {
|
|
86
|
+
if (runs.length) runs.at(-1).text += char
|
|
87
|
+
else pending += char
|
|
88
|
+
} else if (runs.at(-1)?.script === script) runs.at(-1).text += char
|
|
89
|
+
else {
|
|
90
|
+
runs.push({ script, text: pending + char })
|
|
91
|
+
pending = ""
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (pending) runs.push({ script: "common", text: pending })
|
|
95
|
+
return runs
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** The scripts a text needs, beyond the shared characters. */
|
|
99
|
+
export const scriptsIn = (text) => [...new Set(scriptRuns(text).map((run) => run.script).filter((s) => s !== "common"))]
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The font ids a text needs with `primary` as its face: the face, then a shipped font for
|
|
103
|
+
* each other script in it. A script with no shipped font ("other") adds none: the system
|
|
104
|
+
* stack draws it, and the glyph check says so.
|
|
105
|
+
*/
|
|
106
|
+
export function fontsFor(text, primary) {
|
|
107
|
+
const ids = [primary]
|
|
108
|
+
for (const script of scriptsIn(text)) {
|
|
109
|
+
const id = script === "latin" ? null : SCRIPT_FONTS[script]
|
|
110
|
+
if (id && !ids.includes(id)) ids.push(id)
|
|
111
|
+
}
|
|
112
|
+
return ids
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The line height a text needs (TP7): each shipped font's box (its hhea ascent and descent, measured
|
|
117
|
+
* from the pinned file and rounded up, SPIKES §6) is taller than a 1.18 line for most of them, and
|
|
118
|
+
* Chrome counts the box past the line as overflow. The look's own height when none is taller.
|
|
119
|
+
*/
|
|
120
|
+
export function lineFor(text, primary, base) {
|
|
121
|
+
return Math.max(base, ...fontsFor(text, primary).map((id) => FONTS[id]?.line ?? 0))
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The CSS font-family for a text: the shipped families it needs, in order, then the
|
|
126
|
+
* system stacks standing in for each, so a missing pack degrades to today's look.
|
|
127
|
+
* @param {string} text
|
|
128
|
+
* @param {string} primary a font id of FONTS
|
|
129
|
+
* @param {{ has(id: string): boolean } | null} installed the pack's fonts here; null: assume all
|
|
130
|
+
*/
|
|
131
|
+
export function fontStackFor(text, primary, installed = null) {
|
|
132
|
+
const ids = fontsFor(text, FONTS[primary] ? primary : "font-inter")
|
|
133
|
+
const shipped = ids.filter((id) => !installed || installed.has(id)).map((id) => `'${FONTS[id].family}'`)
|
|
134
|
+
return [...shipped, ...ids.map((id) => FONTS[id].system)].join(",")
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** The family names a stack would draw with if no system font existed: what ET-TY-M1 renders the second time. */
|
|
138
|
+
export const shippedOnly = (stack) => stack.split(",").filter((name) => /^'Kriya /.test(name)).join(",") || "monospace"
|
|
139
|
+
|
|
140
|
+
/** @font-face rules naming each font by id; the renderer fills in the file (withFonts). */
|
|
141
|
+
export function fontFaces(ids) {
|
|
142
|
+
return [...new Set(ids)]
|
|
143
|
+
.filter((id) => FONTS[id])
|
|
144
|
+
.map((id) => `@font-face{font-family:'${FONTS[id].family}';src:url("kriya-font:${id}") format("truetype");font-weight:100 900;font-display:block}`)
|
|
145
|
+
.join("")
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const FACE = /@font-face\{font-family:'[^']+';src:url\("kriya-font:([a-z0-9-]+)"\)[^}]*\}/g
|
|
149
|
+
|
|
150
|
+
/** The font ids a composition asks for. */
|
|
151
|
+
export const fontsAsked = (html) => [...String(html).matchAll(FACE)].map((m) => m[1])
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* A composition with each asked font's file put in as data. A font this computer
|
|
155
|
+
* doesn't have is dropped from the page, so its system stack draws.
|
|
156
|
+
* @param {string} html
|
|
157
|
+
* @param {Map<string, string> | undefined} files font id → path, from installedFonts()
|
|
158
|
+
*/
|
|
159
|
+
export function withFonts(html, files) {
|
|
160
|
+
if (!html.includes("kriya-font:")) return html
|
|
161
|
+
return html.replace(FACE, (rule, id) => {
|
|
162
|
+
const path = files?.get(id)
|
|
163
|
+
if (!path) return ""
|
|
164
|
+
return rule.replace(`kriya-font:${id}`, `data:font/ttf;base64,${readFileSync(path).toString("base64")}`)
|
|
165
|
+
})
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The pack's fonts installed in a runtime: id → file. Only from a pack that finished
|
|
170
|
+
* installing, and only the files its signed manifest names.
|
|
171
|
+
* @param {{ dir: string, manifest: object } | null} runtime
|
|
172
|
+
* @returns {Map<string, string>}
|
|
173
|
+
*/
|
|
174
|
+
export function installedFonts(runtime, platform = `${process.platform}-${process.arch}`) {
|
|
175
|
+
const out = new Map()
|
|
176
|
+
const offered = runtime?.manifest?.platforms?.[platform]?.packs?.[FONT_PACK]?.artifacts ?? []
|
|
177
|
+
const dir = runtime && join(runtime.dir, "packs", FONT_PACK)
|
|
178
|
+
if (!dir || !existsSync(join(dir, ".complete"))) return out
|
|
179
|
+
for (const artifact of offered) {
|
|
180
|
+
const path = join(dir, artifact.id, artifact.entry)
|
|
181
|
+
if (FONTS[artifact.id] && existsSync(path)) out.set(artifact.id, path)
|
|
182
|
+
}
|
|
183
|
+
return out
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* ─────────────────────────────── the glyph check ─────────────────────────────── */
|
|
187
|
+
|
|
188
|
+
/** Scripts the OCR helper reads, and the language it reads each with (TPX-05, SPIKES §6). */
|
|
189
|
+
export const OCR_READS = { latin: "en-US", devanagari: "hi-IN" }
|
|
190
|
+
|
|
191
|
+
/** Grapheme clusters a text should show, spaces aside: what the shaped count is compared to. */
|
|
192
|
+
export function clusterCount(text) {
|
|
193
|
+
const segmenter = new Intl.Segmenter(undefined, { granularity: "grapheme" })
|
|
194
|
+
return [...segmenter.segment(String(text))].filter(({ segment }) => /\S/u.test(segment)).length
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* QG-10 where no reader reads the script (CRAFT §5.1): every glyph drawn by a font, none by
|
|
199
|
+
* the last-resort box font; with the pack installed, none by a system font either; and as
|
|
200
|
+
* many clusters drawn as the text has.
|
|
201
|
+
* @param {{ text: string, fonts: { family: string, custom: boolean, glyphs: number }[], drawn: number, missing?: number }} report from checkGlyphs, per text element
|
|
202
|
+
* @param {{ shipped: boolean }} expect shipped: the pack's fonts were installed for this render
|
|
203
|
+
* @returns {string[]} what is wrong; empty when it holds
|
|
204
|
+
*/
|
|
205
|
+
export function glyphProblems({ text, fonts, drawn, missing: boxes = 0 }, { shipped }) {
|
|
206
|
+
const problems = []
|
|
207
|
+
const missing = fonts.filter((f) => /last ?resort/i.test(f.family))
|
|
208
|
+
if (missing.length) problems.push(`${missing.reduce((n, f) => n + f.glyphs, 0)} missing glyph(s) in "${text}"`)
|
|
209
|
+
// A cluster drawn as its font's empty box (readClusters' canvas check): no font in the stack has it
|
|
210
|
+
else if (boxes > 0) problems.push(`${boxes} missing glyph(s) in "${text}", drawn as an empty box`)
|
|
211
|
+
if (shipped) {
|
|
212
|
+
const system = fonts.filter((f) => !f.custom && !/last ?resort/i.test(f.family))
|
|
213
|
+
if (system.length) problems.push(`"${text}" drew with ${system.map((f) => f.family).join(", ")}, not the shipped fonts`)
|
|
214
|
+
}
|
|
215
|
+
const expected = clusterCount(text)
|
|
216
|
+
if (drawn !== expected) problems.push(`"${text}" shows ${drawn} of its ${expected} clusters`)
|
|
217
|
+
return problems
|
|
218
|
+
}
|