Release Font Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 12:18:37 +02:00
parent 25ff321f2a
commit 873cf3c04b
39 changed files with 2431 additions and 181 deletions
+25
View File
@@ -17,6 +17,7 @@ const inspection: FontInspection = {
coverageRangesTruncated: false,
coverageBlocks: [],
axes: [{ tag: "wght", name: "Weight", min: 200, default: 400, max: 900 }],
layout: [],
embedding: {
raw: 0,
rawHex: "0x0000",
@@ -52,4 +53,28 @@ describe("safe CSS generation", () => {
);
expect(() => validateLocalPath("./font\n.woff")).toThrow(/control/u);
});
it("labels collection CSS as non-portable face selection", () => {
const result = generateFontFace({
family: "Fixture collection face",
sourcePath: "./fonts/fixture.ttc",
display: "swap",
inspection: {
...inspection,
fileName: "fixture.ttc",
container: "collection",
collection: {
version: "1.0",
selectedFace: 0,
hasDigitalSignature: false,
faces: [],
},
},
includeUnicodeRange: false,
});
expect(result.css).toContain('format("collection")');
expect(result.warnings).toContainEqual(
expect.stringMatching(/cannot portably identify/u),
);
});
});