Compensated tuning candidates
Compensated tuning is a deterministic two-master scaling workflow. It compares compatible outlines in a base and reference master, derives interpolation factors from their geometric difference, and scales while approximately preserving stem thickness. It is not a generic “make this master lighter” command.
Glyphs MCP 1.8 exposes this workflow only through candidate sessions:
preview_compensated_tuning_candidatereview_outline_candidate_sessionaccept_outline_candidate_sessionwithdry_run=true- explicit designer approval
accept_outline_candidate_sessionwithconfirm=true
The old measurement, direct review, and direct batch-apply commands are removed. Their deterministic mathematics remains internal to the candidate adapter.
Preconditions
- Use different base and reference masters with compatible path and node topology.
- Target explicit glyphs and masters. Components are blocked because this operation promotes node coordinates, smooth flags, and width only.
- Use finite scale and compensation values.
keep_strokematters only when a real two-master geometric delta exists. - Never expect
base_master_id == ref_master_idto create a weight change. - The tool never saves the font.
Important parameters
base_master_idis the source master being tuned.ref_master_idsupplies the compatible comparison geometry.output_master_ididentifies the destination source layer.sxandsyare horizontal and vertical scale factors.keep_strokecontrols compensation when factors are derived automatically.- Explicit
q_xandq_yoverride automatic compensation. extrapolationisclamp,allow, orerrorwhen a computed factor falls outside[0, 1].
Safe workflow
First resolve the font and master IDs with list_open_fonts and
get_font_masters. Preview a small explicit glyph set:
{
"font_index": 0,
"glyph_names": ["A", "B", "C"],
"base_master_id": "REGULAR_MASTER_ID",
"ref_master_id": "BOLD_MASTER_ID",
"output_master_id": "REGULAR_MASTER_ID",
"sx": 0.97,
"sy": 1.0,
"keep_stroke": 0.9,
"extrapolation": "clamp"
}
Inspect the golden-yellow difference-only Candidate Reporter. The normal Glyphs
outline remains visible; unchanged geometry receives no overlay drawing. If
manual edits are needed, call materialize_outline_candidate_session, edit the
native candidate layer, and review it again.
Next call review_outline_candidate_session. Confirm that topology is intact,
components are absent, the source is not stale, and only allowed fields differ.
The review returns a short-lived token bound to source and candidate
fingerprints.
Call accept_outline_candidate_session first with dry_run=true and the exact
token. Show the designer the target count, skipped/error reasons, largest
deltas, width changes, and rollback plan. Only after explicit approval, call it
again with confirm=true. Acceptance consumes the token, rechecks both
fingerprints on the main thread, promotes only allowed fields, verifies the
read-back, removes session layers on complete success, and never saves.
Common mistakes
- Using one master as both base and reference leaves no second shape to interpolate against.
keep_strokeis not an in-place thinning control.- Explicit
q_xorq_ysupersede the corresponding automatic factor. - Incompatible topology or components are safety failures, not candidates for automatic repair.
- A stale source or candidate requires a new review and token.
See the safety model and command set for the common result envelope and candidate lifecycle contracts.