Bundle the Instrument Sans typeface (refs #13)
ci / test (postgres) (push) Successful in 2m23s
ci / test (sqlite) (push) Successful in 2m5s
ci / image (push) Successful in 30s
ci / test (postgres) (pull_request) Successful in 2m14s
ci / test (sqlite) (pull_request) Successful in 1m58s
ci / image (pull_request) Successful in 9s

The user allowed the download, so the interface now uses the typeface
of the mockups instead of the system one. The variable file (weights
400-700) and its SIL OFL licence are embedded and served by the app
itself, never fetched from the internet; source and SHA-256 are in
API-NOTES. The typeface is slightly wider, so top-bar labels and
buttons move to 13 px as in the mockup, keeping the date line whole at
1440 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-10 14:07:47 +01:00
1 parent cf6d0536aa
commit 992467ff04
10 files changed
+132 -5

No files matched your search

+9
View File
@@ -422,6 +422,15 @@ public sealed class ServerTests
CollectionAssert.AreEqual(await File.ReadAllBytesAsync(Path.Combine(Repo.Root.FullName, "docs", "design", "logo", "anubis.svg")), served);
Assert.Contains("frame-ancestors 'none'", logo.Headers.GetValues("Content-Security-Policy").Single());
Assert.AreEqual("nosniff", logo.Headers.GetValues("X-Content-Type-Options").Single());
// The typeface travels with the app, with its licence beside it (ADR 0004).
using var font = await server.GetAsync("/assets/InstrumentSans.ttf");
Assert.AreEqual(HttpStatusCode.OK, font.StatusCode);
Assert.AreEqual("font/ttf", font.Content.Headers.ContentType!.MediaType);
var fontPath = Path.Combine(Repo.Root.FullName, "src", "Anubis.Server", "Assets", "InstrumentSans.ttf");
CollectionAssert.AreEqual(await File.ReadAllBytesAsync(fontPath), await font.Content.ReadAsByteArrayAsync());
StringAssert.Contains(await server.TextAsync("/assets/InstrumentSans-OFL.txt"), "SIL Open Font License, Version 1.1");
StringAssert.Contains(await server.TextAsync("/assets/app.css"), "url(\"/assets/InstrumentSans.ttf\")");
}
[TestMethod]