Måns GrebäckMåns AI Tools

Manual

AI Kerning, AI Spacing, AI Anchors and AI Variable Font: four plugins for Glyphs 3 and Glyphs 4. This page covers installing them, the license, and every option.

Install

  1. In Glyphs, open Window → Plugin Manager, find Måns AI Kerning, Måns AI Spacing, Måns AI Anchors and Måns AI Variable Font, and click Install on the ones you want.
  2. Install the vanilla module too (Plugin Manager → Modules). The plugins' windows are built with it.
  3. Restart Glyphs.

Without Plugin Manager: download the plugins, unzip, and double-click each .glyphsPlugin.

Where to find them afterwards:

  • Glyph → AI Kerning…, Glyph → AI Spacing…, Glyph → AI Anchors…
  • File → AI Variable Font…

The models run on our server, so the plugins need an internet connection. They send the outlines and get back numbers; nothing is installed on your computer but the plugins.

Free and full version

FreeFull
GlyphsA–Z and a–zEvery glyph, or the ones you select
Runs10 a day per pluginUnlimited
SettingsShown, greyed outAll settings
Right-click menu—AI Anchors: set, reset, custom
UseNon-commercialCommercial

One license unlocks all four plugins in Glyphs 3 and Glyphs 4. It is bought once; there is no subscription. Buy the full version.

License key

After buying, the key arrives by e-mail and on the thank-you page. It looks like MT-XXXXXX-XXXXXX-XXXXXX-XXXXXX.

Activate

  1. Open any of the plugins.
  2. Click License key (free version: at the bottom; full version: under About).
  3. Paste the key and click Activate.

All four plugins switch to the full version at once.

One computer at a time

A license is used on one computer, with Glyphs 3 and Glyphs 4 both covered. To move to a new computer, paste the key there. The old computer is then deactivated permanently, and it is not possible to reactivate it on that machine.

Remove the key

License key → Remove key, then Yes, remove. The plugins go back to the free version on this computer. The key stays valid and can be pasted again later on the same computer.

The dialog

All four plugins share the same window:

  • Settings ▾ / ▸ shows or hides the options. The choice is remembered.
  • The main button (Kern, Space, Place, Make) runs the plugin on the current master.
  • About ▸ explains the plugin; More info leads to this site.
  • Options that have no effect with the current choices are hidden. For example, Snap within appears only when snapping is on.
  • Open the … glyphs in a new tab (the last option) opens exactly the glyphs that were changed.

Each run adds a line to the font's Note and to its Description (name ID 10, exported with the font), e.g. Kerning by Måns Grebäck's AI Kerning plugin, generation ID: …. The ID helps us look into a run if something goes wrong.

Save a copy of your font before running a plugin. The changes can be undone in Glyphs, but a saved copy is the safe way back.

AI Kerning

Kerns the current master. The AI predicts every pair; the plugin writes the pairs that matter, sorted into kerning groups with exceptions where a glyph differs from its group.

KernAll glyphs: every pair of the kernable glyphs.
Selected glyphs: the selected glyphs against all glyphs, on both sides. Glyphs in the same kerning group as a selected glyph come along. Every other pair keeps its exact current value.
Accented glyphsKern individually: Á, Ä, Å … get their own pairs.
Inherit base: they get the kerning and kerning groups of their base letter (letters with ogonek or an apostrophe-caron only on their left side).
Strength %Scales the AI's values. 100 is as predicted, 80 is a fifth lighter.
Skip adjustments underIn units. A pair the AI would kern by less than this, in either direction, is not written; 0 keeps every pair. Only applies to what the AI adds; your existing pairs are never removed by it.
Uppercase, Lowercase, Figures, Punctuation and symbolsWhich kinds of glyphs are kerned. Latin, Greek and Cyrillic letters are kerned.
Fill in missing kerning onlyKeeps every pair the font already has and adds only the pairs it lacks.
Group glyphs that kern alikeGlyphs whose kerning is nearly the same share a kerning group, which keeps the kerning table small.
Keep the font's kerning groupsUses your groups as they are; glyphs without a group may still join one. Shown when grouping is on.
Group toleranceIn units: how far apart two glyphs' values may be and still count as alike. Shown when grouping is on.
Exceptions %The share of partners where a glyph may differ from its group by more than the tolerance; those pairs become exceptions. Shown when grouping is on.

AI Spacing

Sets the left and right sidebearings of the current master. Outlines are moved and widths set; nothing is redrawn.

SpaceAll glyphs or Selected glyphs.
Keep spacing on reference glyphsThe glyphs you name keep their spacing exactly, and the AI spaces everything else to match them. Without it, the AI chooses the overall tightness itself.
ReferencesListed below: the glyphs in the field below.
All other glyphs: every glyph you did not select. Use this to space a few new glyphs to fit a font that is already spaced. Shown when the option above is on and Selected glyphs is chosen.
Reference glyphsTyped as characters, e.g. HOnoAVaeil.

AI Anchors

Places anchors in the current master. The AI reads each glyph's outline and puts every anchor where it belongs on that shape. The free version places top and bottom on A–Z and a–z.

Place onA–Z, a–z, marks: the 52 letters and the combining marks (acutecomb, dieresiscomb …).
Selected glyphs: any glyph you select, including glyphs made of components.
AnchorsWhich anchors each glyph gets; see below.
Replace anchors that already existOn: existing anchors are moved to the AI's position. Off: they stay where they are and only missing anchors are added.
Snap height to baseline, x-height or cap heightOff by default. On: an anchor that lands near one of these lines is placed exactly on it.
Snap within (units)How near is near enough. Shown when snapping is on.

Which anchors

The AI only ever sees the outline, never the glyph's name. The name decides which anchors to place; the AI decides where.

  • All rule anchors: a list of about 290 glyphs says which anchors each one has: A gets top, bottom and ogonek; O also gets center, topright and topleft; acutecomb gets _top. A glyph not on the list uses a reference glyph: by its character (Á, Å use A; ø uses o; & uses E), by its name with the accent words removed (Odieresismacron uses O), or by its first component (zero made of an O uses O). Variants use their base glyph's list: G.ss01 and G.sc get G's anchors, each placed on its own outline. A selected glyph with no list and no reference, such as five, gets top and bottom.
  • Top and bottom only: as above, but only top and bottom.
  • Let the AI decide: no list at all. For each glyph the AI adds the anchors it is at least 50 % sure the shape needs. Useful for symbols and scripts the list does not cover.
  • Your saved sets, then Custom… to make one; see Custom anchor sets.

After a run the message names the references used (e.g. Aacute as A) and any glyph that got nothing.

Right-click menu (full version)

Select glyphs in the font view or an edit tab, right-click, and choose AI Anchors:

  • Set anchors: adds the anchors that are missing and leaves existing ones where they are.
  • Reset anchors: removes the glyphs' anchors and places all of them anew.
  • Custom anchors…: places anchors as if the glyphs were another glyph. Type its name (e.g. R for an H that should get R's anchors, A for a J that needs an ogonek).

The right-click menu uses the options last set in the dialog. In an edit tab the glyphs stay where they are; from the font view, a new tab opens if that option is on.

Custom anchor sets (full version)

A named list of glyphs with the anchors you want on each. Choose Anchors → Custom…:

  1. Give the set a name.
  2. Add glyphs: type or pick a name and click Add, or Add selected glyphs. Each row shows the anchors the glyph gets by default, comma separated.
  3. Edit the anchors freely. Any name works:
    • Names the AI knows (top, bottom, center, ogonek, topright, topleft and their _ forms) are placed by the AI.
    • Related names go where they belong: top.2, upper → top; low, bottomexample → bottom; middle → center; _low → _bottom.
    • Other names (exit, entry …) are placed just above top and just below bottom, alternating.
  4. Place anchors as if glyph (optional, last column): the glyph whose anchors this one gets, like Custom anchors in the right-click menu. The row's anchors change to that glyph's, unless you have edited them.
  5. Save. The set appears in the Anchors menu above Custom… and is selected.

With a set chosen, its glyphs get the set's anchors and every other glyph its usual ones. Open saved edits a set; Delete set removes it. Save is greyed out until the set has a name, at least one glyph and a change; closing with unsaved changes asks first.

AI Variable Font

Makes a variable font from the current master of a single-style font. The result opens as a new font; your font is not changed.

Weight axisAdds Light and Black masters.
Width axisAdds Condensed and Extended masters.

With both axes the new font has nine masters (Light Condensed to Black Extended) and its instances. Every node is kept, so all masters stay compatible. Glyphs made of components stay components. The free version works on A–Z and a–z.

Glyphs made of components

A glyph made of components counts exactly like a drawn glyph: the AI sees it as drawn, components included. This is true for an accented letter (Aacute = A + acutecomb), a b made from a flipped d, and an A made from a turned V plus a crossbar.

  • Kerning and anchors treat them as any other glyph.
  • Spacing: a glyph whose components Glyphs keeps aligned automatically follows its base glyph's spacing, as Glyphs always does. The plugins never turn that alignment off. Every other glyph made of components is spaced on its own shape.
  • Changing a glyph never moves another glyph you did not choose. If V is spaced and A contains a turned V, the V inside A is held exactly where it was drawn.

Scripts and MCP

The full version can also be run from the Macro panel, a script, or an AI assistant through the Glyphs MCP server:

import MansAITools
f = Glyphs.font
MansAITools.kern(font=f, glyphs=["A", "V"], strength="80")
MansAITools.space(font=f, master="Regular", lock=True, refs="HOno")
MansAITools.anchors(font=f, glyphs=["J"], treat_as="A")      # Custom anchors
MansAITools.anchors(font=f, glyphs=["G.ss01"], reset=True)   # Reset anchors
MansAITools.variable(font=f, width=False)
  • Keyword arguments are the dialog's options; left out, the dialog's default is used. help(MansAITools.kern) lists them.
  • font: any open font. master: a master or its name. glyphs: names to work on instead of the selection.
  • Each call returns the message and the names of the changed glyphs. Nothing is opened or shown; AI Variable Font saves the new font and returns its path.

Privacy

Font and plugin data will be sent to, stored and processed on the aringtypeface.com server: the options you have selected, and the metrics and outlines needed. Only the current master and the glyphs your chosen options require are sent; no other masters, glyphs or font data. Your license key and computer ID are sent for validation. No data is shared with any third party, but it may be used to improve the product.

Terms

Do not submit any confidential or protected work, nor work you do not own. Save a copy of your work before running a plugin. The plugins are provided as they are, without warranty; check the results before you use them. A license is for one person on one computer at a time.

Troubleshooting

“The server could not be reached”Check the internet connection. The plugins need it for every run.
“Limit reached”The free version runs 10 times a day per plugin. Try again tomorrow, or get the full version.
The key is in use on another computerA license works on one computer at a time. The plugin offers to move it here; the other computer is then deactivated permanently.
Nothing happens on some glyphsGlyphs without outlines are skipped, and the free version works on A–Z and a–z only. The message after the run says what was done.
Results look offThe plugins work best on clear upright sans, serif and display styles. Spacing and kerning may not suit fonts that need a particular rhythm, such as monospaced or connected scripts. Very flourished glyphs, or swashes far beyond the sidebearings, may confuse the model.
The menu items are missingInstall the vanilla module in Plugin Manager and restart Glyphs.