Skip to content

Editorial diagram design for Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, and Pi. 45 diagram types. Self-contained HTML + SVG. No shadows. No Mermaid slop.

docs(primitives): budget label widths for font substitution (#240)

Bear Code0ed472ece9da
diff --git a/skills/diagram-design/references/primitives-core.md b/skills/diagram-design/references/primitives-core.md
index 657519b..9180f46 100644
--- a/skills/diagram-design/references/primitives-core.md
+++ b/skills/diagram-design/references/primitives-core.md
@@ -112,6 +112,8 @@ Rules:
- Never `writing-mode` vertical.
- For vertical segments, place the label to the side (not on the line) with the same 6–10px horizontal gap.
+**Font substitution.** Don't estimate per-character widths — use the `style-guide.md` budget (0.60em sans / 0.62em mono per char). A production run sized mono labels at ~0.47em/char and clipped twice; the calibrated budget fits both Geist Mono and the common substituted mono faces (Menlo, Courier New, Monaco, all ≈0.60em). Previews via `rsvg`/`inkscape` can't fetch the injected Google Fonts, so verify with `python3 <repo-root>/scripts/verify-geometry.py` — it checks masks against later-painted nodes, not text fit; holding the budget is yours.
+
## Legend — horizontal strip at the bottom
**Never put the legend inside the diagram area.** Place as a horizontal strip after all nodes, with a hairline separator: