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

+2 -5
View File
@@ -1,6 +1,5 @@
-- font/woff2 tests: every fixture font as WOFF2 (fontTools: the default glyf / loca transform, and with the hmtx transform too) 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/woff2 tests: fontTools' WOFF2 (glyf / loca and hmtx transforms) decodes to the same font as the sfnt.
-- Fixtures: tools/fixtures/fonts.py.
local T = require("@tests/T")
local F = require("@rosetta")
local Woff2 = require("@rosetta/font/woff2")
@@ -66,7 +65,6 @@ for _, w in Fx.woff do
end
t:check(n >= 6, "fixture count")
-- the api
do
local data = Fx.woff[1].woff2
t:eq(F.detect(data), "woff2", "F.detect")
@@ -75,7 +73,6 @@ do
t:eq(Woff2.sniff(Bytes.reader(buffer.fromstring("wOFF"))) + Woff2.sniff(Bytes.reader(buffer.fromstring("wOF2"))), 1, "sniff")
end
-- errors
do
local data = Fx.woff[1].woff2
local _, e1 = Woff2.decode(Bytes.reader(buffer.fromstring(string.sub(data, 1, 30))))