From 7f7eb331fe5be4b40f6cd02ee902b3b0a475832d Mon Sep 17 00:00:00 2001 From: Mannes Brak Date: Sat, 30 May 2026 17:01:51 +0200 Subject: [PATCH] fix(harness-letratag): derive diagnostic width from engine headDots `LetraTagMedia.printableDots` was removed from letratag-core as a redundant field (it duplicated the engine's `headDots`). Read the 30-dot printable width off `engine.headDots` instead of the media descriptor. Works against both the published pin and the local link. --- apps/harness-letratag/src/diagnostic-print.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/harness-letratag/src/diagnostic-print.ts b/apps/harness-letratag/src/diagnostic-print.ts index 5dad34c..cf0e27d 100644 --- a/apps/harness-letratag/src/diagnostic-print.ts +++ b/apps/harness-letratag/src/diagnostic-print.ts @@ -43,10 +43,9 @@ export function buildDiagnosticImage(input: DiagnosticPrintInput): RawImageData // back defensively so a future registry edit doesn't crash. const headDots = engine?.headDots ?? 30; const dpi = engine?.dpi ?? 200; - // Every LT cassette is 12 mm with `printableDots: 30` — read it - // off the media descriptor so we honour any future edge-case - // narrowing (e.g. iron-on cassettes that print fewer rows). - const widthDots = Math.min(input.media.printableDots, headDots); + // Printable head height is an engine fact (`headDots`), not a + // per-cassette one — every LT cassette images the same 30 dots. + const widthDots = headDots; return buildShared({ widthDots, heightDots: Math.round((TAPE_DEFAULT_MM * dpi) / 25.4),