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
@@ -1,8 +1,18 @@
import { expect, it } from "vitest";
import { beforeAll, expect, it } from "vitest";
import { prefsFor, renderFixture } from "./harness";
import { describeSweep, STANDALONE_SWEEP } from "./harness.sweep";
import { TEMPLATES } from "./registry";
// Monolith and Cobalt Stripe: the same sweep as the other templates, in a second file so the two run side by side.
// Monolith, Cobalt Stripe, Marble and Highlighter: the same sweep as the other templates, in a second file so the two run side by side.
//
// Poppins Regular is warmed with a document that has amounts first. fontkit caches glyph objects per font for the process and
// pdfkit creates a composite's components (the period inside Poppins' colon) at embed time with no code points: Monolith, which
// sets ':' in Poppins Regular but amounts in Medium, would leave the period unextractable for Highlighter's amounts
// (src/pdf/quirks.test.tsx, quirk 13).
beforeAll(async () => {
await renderFixture({ name: "warm-up", items: 3 }, prefsFor("A4", { templateId: "highlighter" }));
});
describeSweep((id) => STANDALONE_SWEEP.includes(id));
it("the standalone sweep names registered templates only", () => {