compare_stems
Compare stem thicknesses across glyphs to find inconsistencies. Evaluates each letter against industry standards for optical compensation and flags pass, compensation, inconsistent, or unreliable verdicts.
Instructions
Compare stem thicknesses across multiple glyphs to find inconsistencies.
RECIPE: For a full font audit (stems + color + proportions + spacing), call get_recipe("audit_consistency") — it runs checks in dependency order.
Evaluates each glyph against industry stem patterns for optical compensation. Per-glyph verdicts:
pass: stem within expected tolerance (green in GlyphsApp)
compensation: known optical compensation like round stems, bowl mass (yellow) — only flagged if OUTSIDE the expected range
inconsistent: real issue, deviation exceeds industry norms (red)
unreliable: glyph shape can't be reliably measured (orange)
Each glyph is classified into one of 5 groups:
straight: pure stems (n,h,m,u,i,j,l,r / H,I,L,T,U,F,E,K,J)
round: pure round forms (o,c / O,C,Q)
mixed: stem + bowl (b,d,p,q,g,a,e,s / D,B,P,R,G)
diagonal: diagonal strokes (v,w,x,y,z,k / V,W,X,Y,Z,A,M,N)
optical/figure: special cases (t,f) and numbers (0-9)
Supports uppercase (ref: H), lowercase (ref: n), and figures (ref: H).
If master_id is omitted, analyzes ALL masters and returns per-master results. Glyph color = worst verdict across all masters. If master_id is provided, analyzes that single master only.
Does not modify glyph colors by default. When mark_glyphs=True, marks:
Red=inconsistent, Orange=unreliable, Yellow=compensation, Green=pass
Args: glyph_names: List of glyphs to compare master_id: Optional master ID (empty = all masters) mark_glyphs: Color glyphs by verdict only when explicitly requested
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| master_id | No | ||
| glyph_names | Yes | ||
| mark_glyphs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |