analyze_spacing
Check spacing quality across all masters by measuring sidebearings and white space, then flag inconsistencies against type design standards.
Instructions
Analyze spacing quality across all masters.
RECIPE: For systematic spacing work, call get_recipe("spacing_workflow") first — it follows Cheng/Briem/Ruder methodology step by step.
Measures sidebearings and white space margins using scanline ray-casting, then checks for consistency issues:
Sidebearing group consistency (n-group: h,i,k,l,m,n,p,r should match; o-group: c,d,e,g,o,q)
Tracy/Smith per-glyph sidebearing rules (from "Designing Type" by Karen Cheng)
Side-type ordering (straight SB > round SB > diagonal SB)
Symmetric glyph check (o, O, H, I should have LSB ≈ RSB)
Reference ratios (n LSB / o LSB — optimal ~1.5x, acceptable 1.2–2.0)
Counter-based validation (n LSB should be 25–50% of n counter width)
Word space check (space width ≈ ¼ em ≈ width of i)
Cross-master spacing drift (spacing ratios should be maintained)
Does not modify glyph colors by default. When mark_glyphs=True, marks
significant inconsistencies red, minor deviations yellow, and passes green.
Args: master_id: Optional master ID (empty = all masters) glyph_names: Optional list of glyphs (empty = all Letter glyphs) mark_glyphs: Color glyphs by verdict only when explicitly requested
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| master_id | No | ||
| glyph_names | No | ||
| mark_glyphs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |