Add the Marble and Highlighter templates, completing the 13 Canva templates

Marble uses a flat-to-gradient band in place of the marble photo and bundles Lustria (OFL).
Both logo slots are opt-in. Quirk 13 documents a fontkit glyph-cache issue that the
tests work around with warm-up renders; the engine fix follows separately.
This commit is contained in:
2026-10-04 12:47:05 +05:30
parent 3d42f383ca
commit 579508742f
32 changed files with 3190 additions and 27 deletions
+2 -2
View File
@@ -64,12 +64,12 @@ async function colourAt(bytes: Uint8Array, points: Array<[number, number]>): Pro
const near = (c: number[], hex: string, tol = 8) => [1, 3, 5].map((i) => parseInt(hex.slice(i, i + 2), 16)).every((w, i) => Math.abs(c[i] - w) <= tol);
describe("registry, catalog and fonts", () => {
it("is registered last, as a standalone template with its thumbnail on disk", () => {
it("is registered before Marble and Highlighter, as a standalone template with its thumbnail on disk", () => {
expect(getTemplate("cobalt-stripe")).toBe(cobaltStripe);
expect(cobaltStripe.family).toBe("standalone");
expect(catalogEntry("cobalt-stripe").name).toBe("Cobalt Stripe");
expect(existsSync(path.join(process.cwd(), "public", cobaltStripe.thumbnail)), cobaltStripe.thumbnail).toBe(true);
expect(Object.keys(TEMPLATES).at(-1)).toBe("cobalt-stripe");
expect(Object.keys(TEMPLATES).slice(-3, -2)).toEqual(["cobalt-stripe"]);
expect(TEMPLATE_CATALOG.map((e) => e.id)).toEqual(Object.keys(TEMPLATES));
});