fix: increase tree glyph stroke weight
Reference site / build (push) Canceled after 0s

This commit is contained in:
2026-10-11 01:15:32 +09:00
parent ef5ea5e528
commit 6897b2368a
4 changed files with 45 additions and 14 deletions
+3 -3
View File
@@ -219,8 +219,8 @@ test('trunk thickness and origin stay proportional to the slash throughout scali
await page.clock.runFor(time - previousTime);
const ink = await trunkGeometry(page);
expect(ink.opacity).toBeGreaterThan(0);
// At rest: the Lyth Mono filled stem is 1.064px, slash ink is 21px.
expect(ink.stemWidth).toBeCloseTo(1.064, 5);
// At rest: tree ink is weighted 25% above the font's native 1.064px stem.
expect(ink.stemWidth).toBeCloseTo(1.33, 5);
expect(ink.width / ink.slashHeight).toBeCloseTo(ink.stemWidth / 21, 5);
// The foot is at x=12 within ink bounds x=7…41, not their centre.
expect(ink.anchorX).toBeCloseTo(5 / 34, 5);
@@ -601,7 +601,7 @@ test.describe('JavaScript-free glyph tree', () => {
await expect(page.locator('.branch-prefix svg')).toHaveCount(8);
expect(await page.locator('.branch-prefix').evaluateAll((prefixes) => prefixes.every((prefix) => !prefix.textContent!.trim()))).toBe(true);
const trunk = await trunkGeometry(page);
expect(trunk.width).toBeCloseTo(1.064, 5);
expect(trunk.width).toBeCloseTo(1.33, 5);
expect(trunk.length).toBeGreaterThan(0);
expect(Math.abs(trunk.axis)).toBeLessThan(.1);
expect(trunk.gapRatio).toBeCloseTo(1 / 14, 5);
+13 -1
View File
@@ -20,7 +20,8 @@ test('pinned font binaries and upstream licenses match their integrity manifest'
test('Lyth Mono paths retain exact advance, row bounds and stroke dimensions', () => {
close(cellWidth, 8.456);
close(stemWidth, 1.064);
close(stemWidth, 1.064 * 1.25);
close(branchThickness, (68 / 1170) * 24 * 1.25);
close(branchY, rowHeight / 2);
const vertical = box(glyphPath('│'));
close(vertical.y1, 0);
@@ -31,6 +32,17 @@ test('Lyth Mono paths retain exact advance, row bounds and stroke dimensions', (
close(horizontal.x1, 0);
close(horizontal.x2, cellWidth);
close(horizontal.y2 - horizontal.y1, branchThickness);
close((horizontal.y1 + horizontal.y2) / 2, branchY);
const tee = box(glyphPath('├'));
close(tee.x1, cellWidth / 2 - stemWidth / 2);
close(tee.x2, cellWidth);
close(tee.y1, 0);
close(tee.y2, rowHeight);
const elbow = box(glyphPath('└'));
close(elbow.x1, tee.x1);
close(elbow.x2, cellWidth);
close(elbow.y1, 0);
close(elbow.y2, branchY + branchThickness / 2);
const trunk = box(trunkPath);
close(trunk.x1 + trunk.x2, 0);
close(trunk.x2 - trunk.x1, stemWidth);