fix(arch, table): what the 1.6.0 README renders showed

- The exterior dimension chains follow the plot scale. DIMSCALE is the
  plan's scale while they are drawn and is put back afterwards; a 1:50
  chain's 2.5 text had been 2.5 drawing units, 0.05 mm on the sheet.
- A headless TABLE merges its title row, as AutoCAD's TABLE does; a long
  title no longer wraps inside the first column over the header row.
- A headless TABLE's cell margin scales with the lettering. A flat 1.0 was
  0.02 mm on a 1:50 schedule; tables at the default 2.5 text are unchanged.
- drawing_new writes the Standard text style in arial.ttf, as AutoCAD
  2026's acadiso.dwt ships it: txt has no superscript two, so 'm²' read
  'm?' live and rendered as a box headlessly. The five bundled templates
  are rebuilt and build_templates --check reproduces them.

Each fix has a test that fails on the old code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FKFStjEFzpGyLq5bMpWxTd
This commit is contained in:
Umut CAN
2026-09-25 00:17:10 +03:00
co-authored by Claude Opus 5.5
parent 554daff8d0
commit 7e7fe11a71
13 changed files with 182 additions and 370 deletions
+8
View File
@@ -46,6 +46,14 @@ def _rendered(backend, handle):
# ── headless engine ─────────────────────────────────────────────────────────
async def test_a_new_drawing_writes_standard_in_arial_like_acadiso(backend):
# AutoCAD 2026's acadiso.dwt ships Standard as Arial. ezdxf's own default is
# txt.shx, which has no superscript two: an architectural area label 'm²'
# read 'm?' in AutoCAD and rendered as a box headlessly.
rows = {row["name"]: row["font"] for row in await backend.textstyle_list()}
assert rows["Standard"] == "arial.ttf"
async def test_dimstyle_list_reports_standard_current_with_the_seventeen_values(backend):
rows = await backend.dimstyle_list()
assert [r["name"] for r in rows] == ["Standard"]