fix: render editable score at readable scale

This commit is contained in:
2026-09-22 16:51:44 +08:00
parent bd7585776d
commit 18963168bb
2 changed files with 20 additions and 12 deletions
+4
View File
@@ -59,6 +59,10 @@ test("M3 SVG renderer preserves A4 physical units, semantic IDs and layer separa
assert.equal(probe.hasScoreLayer, true);
assert.equal(probe.hasAssistiveLayer, false);
assert.ok(probe.dataIds.length >= Object.keys(snapshot.symbols).length);
const titleFontSize = Number(svg.match(/data-role="document-id"[^>]*font-size="([0-9.]+)"/)?.[1] ?? 0);
const noteFontSize = Number(svg.match(/data-kind="note"[^>]*>[\s\S]*?font-size="([0-9.]+)"/)?.[1] ?? 0);
assert.ok(titleFontSize > 100);
assert.ok(noteFontSize > 100);
const accessibleProbe = probeSvg(renderSnapshotSvg(snapshot, true)[0]);
assert.equal(accessibleProbe.hasAssistiveLayer, true);
});