mirror of
https://github.com/storytold/cadcraft.git
synced 2026-12-01 10:13:53 -06:00
* Plot: JIS B4/B5/B6 and Japanese paper sizes Japanese drafting uses the JIS B series: B4 257×364 mm, B5 182×257 mm and B6 128×182 mm. The paper table only had the ISO sizes, so a JIS B5 drawing plotted about 7 mm short in each direction. B4/B5/B6 are now the JIS sizes (the names Japanese Excel and drawings use) and the ISO ones stay reachable as `B4 (ISO)`/`B5 (ISO)`; a drawing that stored the ISO sheet keeps its stored size, and a caller that means ISO B5 says so. Adds the Japanese papers the table lacked: Japanese Postcard (はがき, 100×148 mm), Japanese Double Postcard (往復はがき, 148×200 mm), Japanese Envelope #3 (長形3号, 120×235 mm), Japanese Envelope Kaku #2 (角形2号, 240×332 mm) and 四六判 (127×188 mm). A6 was already an ISO sheet. Paper names resolve case-insensitively and ignore spaces, hyphens, underscores and parentheses (`B5 (JIS)`, `b5-jis`, `b5jis`), with the Japanese spellings as aliases too (`はがき`, `往復はがき`, `長形3号`, `角形2号`, `四六判`). The built-in plotters and the Page Setup/Plot paper combo pick the new sizes up from PAPER_SIZES, and the PDF plot's MediaBox and the plot preview use them. Tests: the render paper test pins every new size and alias, the ISO sizes keep their values and the unknown-name fallback is unchanged; a new io test pins the PDF MediaBox for each new paper (JIS B5 515.91×728.50 pt, はがき 283.46×419.53 pt, ISO B4/B5 and the rest), and the plot-preview test checks that `B5` resolves to JIS B5 and `B5 (ISO)` to ISO B5. Docs: docs/plotters.md standard sizes and the `pagesetup`/PDFBOOK parameter notes, and ROADMAP.md progress log + revision history, dated 2026-10-21. * Plot: B4/B5/B6 stay ISO; JIS sizes by explicit name Review follow-up: making the bare names mean JIS changed the ISO sizes for every user. `B4`/`B5` are the ISO sizes again, an ISO B6 row (125×176 mm) completes the bare series, and the JIS sheets (JIS P 0138, 257×364, 182×257 and 128×182 mm) are reachable only as `B4 (JIS)`/`JIS B4`, `B5 (JIS)`/`JIS B5` and `B6 (JIS)`/`JIS B6`. Drop the ambiguous bare `Postcard` and `Double Postcard` aliases; the name and はがき/往復はがき say which postcard is meant. Drop the ROADMAP.md edit (ROADMAP.md stays at origin/main's content). The render and io paper tests, the plot-preview test and docs/plotters.md follow the new mapping; the Japanese stationery sizes and their はがき/ 往復はがき/長形3号/角形2号/四六判 spellings are unchanged. Still safe for stored papers: a page setup keeps the canonical paper name with its width/height, DXF groups 44/45 round-trip those sizes, and the ISO canonical names (and the JIS rows by name) did not change. * Plot: full-width paper names resolve like their ASCII forms A Japanese keyboard or IME gives B5 (JIS); fold U+FF01..U+FF5E to ASCII (and the ideographic space to a space) before the existing normalisation, with a test. --------- Co-authored-by: midasdf <midasdf@tutamail.com>