tests/font: comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:51:09 -05:00
1 parent 7672980c65
commit 9d80ee11b9
12 files changed
+15 -69

No files matched your search

+1 -5
View File
@@ -1,6 +1,4 @@
-- font/woff tests: every fixture font as WOFF 1.0 (fontTools, zlib tables) decodes to the same font as the sfnt itself (font/ttf, checked against
-- fontTools / FreeType in tests/font/ttf.luau): metrics, names, every glyph's outline, advance and side bearing,
-- cmap and kerning samples; rasterize works; the api detects it; errors; the fuzz pass. Fixtures: tools/fixtures/fonts.py.
-- font/woff tests: fontTools' WOFF 1.0 decodes to the same font as the sfnt (tools/fixtures/fonts.py).
local T = require("@tests/T")
local F = require("@rosetta")
local Woff = require("@rosetta/font/woff")
@@ -66,7 +64,6 @@ for _, w in Fx.woff do
end
t:check(n >= 6, "fixture count")
-- the api
do
local data = Fx.woff[1].woff
t:eq(F.detect(data), "woff", "F.detect")
@@ -75,7 +72,6 @@ do
t:eq(Woff.sniff(Bytes.reader(buffer.fromstring("wOFF"))) + Woff.sniff(Bytes.reader(buffer.fromstring("wOF2"))), 1, "sniff")
end
-- errors
do
local data = Fx.woff[1].woff
local _, e1 = Woff.decode(Bytes.reader(buffer.fromstring(string.sub(data, 1, 30))))