Glyphs mcp spacing

From thierryc/Glyphs-mcp · View interactive version

Glyphs mcp spacing is an AI agent skill from the GitHub repository thierryc/Glyphs-mcp. Review or respace glyph sidebearings and widths with reference-based suggestions, preserving metrics keys and native alignment.

How to use this skill

Skill file

Glyphs Spacing

Use for spacing or respacing, sidebearing and width review, and applying existing

metrics keys. Choose the matching route below: applying keys synchronizes existing

metrics; it does not compute new optical spacing.

For read-only layer measurements, use read_entities and the

native layer read reference. Resolve exact

layer IDs, preserve fractional values and distinguish stored keys from effective

metrics. A measurement request does not need a spacing job or Save.

Reuse the verified $glyphs connection, capabilities and

intended document_id already in context; do not repeat setup for this skill.

If missing, use connection setup

and document targeting. Reuse the

ID for reads of the same font; rediscover after document_not_found or target

change, not a missing glyph. Never silently substitute another open font.

Each read is fresh; check source/dirty state when preparing edits.

For typed spacing jobs, prepare with start_job, inspect get_job until ready, and

review its report before apply_job. Application is a reversible live change;

it does not save. Use accept_job only when the user's task authorizes saving

the reviewed whole document; it closes the rollback window. Use discard_job

for whole-job restoration or cancellation. Native Undo and Redo are grouped per

glyph. Never save merely to satisfy preparation, and never save, export, close,

or overwrite a font unless the user's task authorizes it. Do not retry an

uncertain write or save as a new job; reconcile the existing job identity first.

For an explicit numeric rule across many layers, such as fixed widths or a

reviewed bearing/key adjustment, offer direct native scripting under the

shared route and recovery guide.

One callback can apply the rule locally with Run without Save and whole-font pre-run snapshot

restoration. Preserve key ownership, tabular widths, marks and component alignment;

verify bearings and proofs. Keep spacing for reference-based suggestions: a

bulk assignment does not reproduce its algorithm. Genuinely unsupported edits

can also use an advertised script job or an authorized native workflow.

When the task is to apply existing metrics keys, prefer the advertised

native_action named update_metrics; it uses Glyphs syncMetrics() and is

not a request to recalculate bearings. Follow the

closed native-action contract, target

exact layers, and review keys plus resulting metrics before acceptance. Do not

substitute a script when that action is absent from nativeActions.

Prepare kind="spacing" with explicit glyphs and optional masters, reference,

references, and widthMode options. Ask whether current metrics are trusted or

placeholders when that affects reference selection. Preserve tabular widths,

marks, metrics keys and native component alignment. The project ignores

translations and width differences at or below 0.001 font units before

preparation; exact application, history and recovery remain exact. Inspect the

effective bearings in the proof. Review HHHOHH, AVAYAW, nonono and mixed text

before accepting suggestions. This is a first pass, not optimal optical spacing.

See lean spacing for the supported options.

Documentation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.