feat(md-print): use mm font and corner page numbers

Body font size is now specified in millimetres and defaults to 3mm. Page numbers move from the centre footer to the outer bottom corners, alternating left and right per A5 page.
This commit is contained in:
2026-10-23 11:28:22 +08:00
parent 80da5364e5
commit 1ce76dca64
12 changed files with 60 additions and 34 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ export const PRINT_DEFAULTS: PrintConfig = {
columns: 2,
margin: 10,
gap: 5,
font: 9,
font: 3,
title: "",
pageNumbers: true,
cutMarks: true,
@@ -43,7 +43,7 @@ export function normalizePrintConfig(
),
margin: clamp(toNumber(input.margin, PRINT_DEFAULTS.margin), 5, 40),
gap: clamp(toNumber(input.gap, PRINT_DEFAULTS.gap), 0, 20),
font: clamp(toNumber(input.font, PRINT_DEFAULTS.font), 6, 16),
font: clamp(toNumber(input.font, PRINT_DEFAULTS.font), 2, 6),
title:
typeof input.title === "string" ? input.title : PRINT_DEFAULTS.title,
pageNumbers: toBoolean(input.pageNumbers, PRINT_DEFAULTS.pageNumbers),