Repository navigation
docs(printing): add non-Latin ESC/POS capability study and hardware-test plan - #476
Merged
Merged
Conversation
Add docs/printing-nonlatin-capabilities.md (#446): evidence-based comparison of printer-native shaping, code pages, UTF-8 pass-through, host-side shaping/bidi, and GS v 0 raster approaches across the raw print transports; survey of Odoo, escpos-php, python-escpos, node-thermal-printer, and ReceiptPrinterEncoder practice; real-user requirements from #437/#241; decision record for a capability-tiered hybrid with raster fallback; community hardware-test matrix checklist; test-page raster probe specification; and open dependency decisions deliberately left to separate review. Link the study from the printers doc and documentation index. Fixes #446. Refs #438.
…lacement, checklist width wording
…inters.md study pointer placement
Contributor
Greptile SummaryThe PR adds a forward-looking capability study for non-Latin ESC/POS printing and links it from the printer documentation and documentation index.
Confidence Score: 4/5The documentation-only PR appears safe to merge, with a non-blocking clarification needed in the future raster-probe specification. The study accurately describes current printer behavior and clearly labels planned architecture, but its probe instructions do not yet define how profiles yield raster dots or how the intended symmetric inset is positioned. Files Needing Attention: docs/printing-nonlatin-capabilities.md
|
| Filename | Overview |
|---|---|
| docs/printing-nonlatin-capabilities.md | Adds the capability study, architecture decision, hardware checklist, and raster probe; the probe leaves its canonical dot-width and inset-placement calculations under-specified. |
| docs/printers.md | Adds a valid link from current printer guidance to the clearly identified forward-looking study. |
| docs/README.md | Correctly indexes the new study in the active-design and forward-looking documentation table. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PrintDocument] --> B{Content and printer capability}
B -->|Pure Latin or ASCII| C[Tier 1: Native ESC/POS text]
B -->|Non-Latin and proven firmware shaping| D[Tier 2: Native shaping passthrough]
B -->|Other non-Latin content| E[Tier 3: Shaped raster bands via GS v 0]
E -->|Mixed mode fails on hardware| F[Tier 4: Whole-receipt raster]
E -->|Raster unavailable or fails| G[Tier 5: Skip with explicit warning]
F -->|Raster unavailable or fails| G
Reviews (1): Last reviewed commit: "no-mistakes(document): docs(printing): f..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Ship the #446 docs deliverables for epic #438: add docs/printing-nonlatin-capabilities.md — an evidence-based capability study and decision record for non-Latin scripts on ESC/POS thermal printers — plus the community hardware-test matrix checklist and test-page raster probe specification, and link the study from docs/printers.md and docs/README.md. Scope constraints set by the captain: documentation only; do NOT touch production renderers and do NOT add any dependency (the rendering-engine dependency decision stays a captain call, listed as an open decision in the doc). PR body must carry Fixes #446 Refs #438.
What Changed
docs/printing-nonlatin-capabilities.md, an evidence-based capability study and decision record for non-Latin scripts (Arabic/Persian, Hebrew, CJK, Indic) on ESC/POS thermal printers: compares the candidate approaches (printer-nativearabicShapingpassthrough, legacy code pages, UTF-8 pass-through, host-side shaping + bidi reordering,GS v 0raster rendering, HTML/browser fallback) and recommends a capability-tiered architecture that keeps pure Latin output on native ESC/POS bytes while falling back to host-shaped, bidi-correct raster bands for non-Latin content.docs/printers.mdand index it as FORWARD-LOOKING indocs/README.md; the delta touches documentation only, changing no production renderer code and adding no dependency.Fixes #446. Refs #438.
Risk Assessment
✅ Low: Documentation-only change whose three prior findings are each verified fixed against current file contents (all section cross-references resolve correctly, the FORWARD-LOOKING row sits in the correct index table, and the checklist inset figure matches the specified widthDots - 16 probe at ~1 mm per side), with every code-location claim spot-checked as accurate and intent constraints fully satisfied.
Testing
Exercised the change end-to-end as a reader would see it: confirmed the diff is exactly three docs files (documentation-only, no dependency, no renderer changes), validated the study's code-behavior claims against the live source, ran a link/section-reference resolver proving every relative link, anchor, and Section N cross-reference resolves including the two new cross-links, cross-checked the deliverables against issue #446's mandate, then rendered all three documents through marked/GFM and captured Chrome screenshots of the key sections and both link sites. All checks passed; artifacts are in /Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH and the worktree is left clean.
/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/study-01-title-status-problem.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/study-02-criteria-matrix.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/study-03-decision-record.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/study-04-hardware-checklist.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/study-05-raster-probe-spec.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/study-full-page.jpeg)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/link-site-printers-doc.png)/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/link-site-readme-index.png)Evidence: Rendered HTML of the full study document
Evidence: Rendered HTML of docs/printers.md
/Users/gurkiratkhaira/.no-mistakes/evidence/01M0PNQXQXATJ1SQVD3P2YN6KH/README.html)Evidence: Link and cross-reference verification transcript
OK section refs 5/6/7/8 -> matching headings; OK docs/printers.md -> printing-nonlatin-capabilities.md; OK docs/README.md -> printing-nonlatin-capabilities.md; +13 pre-existing README links all OK; ALL LINKS AND SECTION REFS RESOLVE. git diff --check exit 0. Diff touches only the three docs files.Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
docs/printing-nonlatin-capabilities.md:87- Two internal cross-references point to the wrong section: line 87 says the rendering-engine cost is "a dependency question — see Section 7" and the criteria matrix at line 105 lists the extra dep as "rendering engine (Section 7)", but Section 7 is the Test-page raster probe specification. The rendering-engine dependency question lives in Section 8, Open decisions requiring a human call (lines 199-204) - the very section this decision-record tells readers (line 4) to consult. Anyone following these two pointers lands on the diagnostic-band spec instead of the open decision they are meant to evaluate.docs/README.md:30- The new catalog row labels the study FORWARD-LOOKING but was added to the "Current documentation" table (heading at docs/README.md:18), whose rows otherwise all carry Scope CURRENT and describe supported runtime behavior. The same file defines a dedicated "Active design & forward-looking plans" table (docs/README.md:32) for exactly this status, and AGENTS.md directs agents to use this index to distinguish current runtime behavior from planned designs. Misfiling a not-yet-implemented architecture recommendation under Current documentation works against the index's own stated purpose even though the Scope cell itself reads FORWARD-LOOKING.docs/printing-nonlatin-capabilities.md:176- Community checklist item 7 asks testers to confirm the raster band "fills the printable width edge-to-edge", but Section 7 step 1 (line 191) specifies the solid band deliberately inset to widthDots - 16 dots (~2 mm total margin). A tester validating against the specified probe will observe margins by design and report item 7 as failed on healthy hardware. Item 7 should be reworded to match the intended expectation (full-scale width with the small symmetric inset, i.e. detecting shrink/clip rather than literal edge-to-edge fill).🔧 Fix: Fix non-Latin study section refs, README table placement, checklist width wording
✅ Re-checked - no issues remain.
git diff --stat 8efa5aa..24166a0- scope check confirming only docs/README.md, docs/printers.md, and docs/printing-nonlatin-capabilities.md changed (documentation-only, no renderer or package.json edits)git diff --check 8efa5aa..24166a0- clean, no whitespace/conflict-marker errorsNode script resolving every relative markdown link and #anchor against each file's own directory across the three changed docs, plus validating every plain-text 'Section N' reference against actual numbered headings - all resolveSource-claim verification of the doc's 'current code' table via grep/read:main/printers/profiles.ts:24(arabicShaping flag, none set on the four shipped profiles),main/printers/thermal.ts:1528buildEscPos andthermal.ts:1572-1593non-ASCII skip-with-warning guard,frontend/src/lib/printer/warnings.ts:43,127,shared/print/direction.ts:83,92, existence ofshared/print/document.tsCross-checked deliverables against the authoritative research mandate viagh-axi issue view 446 --full(decision record per transport, hardware-test matrix, migration implications for skip-with-warning, open hardware questions)Rendered the three changed markdown files throughnpx marked --gfminto GitHub-style standalone HTML with heading anchors, opened each in Chrome via chrome-devtools-axi at 1280x1000, and captured viewport screenshots at the title/status banner, Section 3.7 criteria matrix, Section 5 decision record, Section 6 hardware checklist, Section 7 raster probe spec, plus a full-page capture and both cross-link locations✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.