> For the complete documentation index, see [llms.txt](https://mkfont.gitbook.io/mkfont-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mkfont.gitbook.io/mkfont-docs/building-a-font/ligatures.md). Agents can also search and read this documentation through its [MCP server](https://mkfont.gitbook.io/mkfont-docs/~gitbook/mcp).

# Ligatures

Glyphs that replace a sequence of characters: what they do in text, every way to create one, the Ligature finder, and what a ligature needs to work in an exported font.

A ligature is created from slots selected in the grid, from text selected in the **Text preview** panel, or in bulk with the **Ligature finder**. Each route gives a glyph whose slot is a sequence of characters. The routes differ in what that glyph starts with.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-3013615d46da0ba9704b7116add9619768de7ceb%2Fligatures-range-and-inspector.png?alt=media" alt="STILL | id: ligatures-range-and-inspector | SHOWS: Where the ligatures of a font are found: the Ligatures entry of the Browse panel with its count, their slots in the viewport, and the selected one in the inspector | FRAME: Full window. Browse panel with Ligatures selected in the Font group, its count beside it. Viewport listing the ligatures, labels on, one ligature with an outline selected. Inspector on that ligature, scrolled to the top | CROP: window | NEEDS: at least two ligatures with outlines | SOURCE: Sample font, browser build"><figcaption><p>One entry of the Browse panel holds every sequence the font has a glyph for.</p></figcaption></figure>

## What a ligature does in text

*Where text is set, one glyph is drawn in place of a sequence of characters. The text keeps its characters.*

A font can declare that a given sequence of characters has a glyph of its own. An application that sets text with ligatures on finds the sequence and draws that one glyph where it would have drawn several. Nothing is replaced in the text: it still holds each character, and is searched, copied and edited as before.

| Used for                                   | The sequence                           | The glyph                                  |
| ------------------------------------------ | -------------------------------------- | ------------------------------------------ |
| Letters that collide when set side by side | Two or three letters, such as f and i. | The same letters, redrawn as one shape.    |
| A drawing reached by typing its name       | A whole word, such as `home`.          | An icon, shown wherever the word is typed. |

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-308dc31d5c6138d10eea6d9a40dbc0f883c812f0%2Fplaceholder-wide.jpg?alt=media" alt="DIAGRAM | id: ligatures-substitution | SHOWS: A ligature changes what is drawn for a sequence of characters, and leaves the characters of the text as they were | ELEMENTS: Three rows. Top row, labelled text: a short word as a run of separate character boxes, each with its Unicode value under it, two neighboring boxes highlighted. Middle row, labelled ligatures off: one glyph drawn under each character box, the two under the highlighted boxes colliding. Bottom row, labelled ligatures on: the same glyphs, except that one wider glyph sits under the two highlighted boxes, joined to both by a bracket labelled ligature. Thin lines from each character box down to its glyph in both rows | MUST BE CLEAR: The row of characters is the same in both cases. Only the number of glyphs drawn under the two highlighted characters changes, from two to one"><figcaption><p>Same text, one glyph fewer.</p></figcaption></figure>

What a ligature is as a glyph, without a character of its own, is on [Fonts, Glyphs & Slots](https://mkfont.gitbook.io/mkfont-docs/how-mkfont-works/fonts-glyphs-and-slots.md).

## Where ligatures are listed

*A ligature has a slot in Ligatures and in My glyphs, and in no other range.*

| Place                                                        | Shows                                                                                                                                                                       |
| ------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Ligatures**, in the **Font** group of the **Browse** panel | The font's ligatures and nothing else, with their count beside the entry. The viewport is titled **Ligatures**, tagged **Font**, and counts them as glyphs under the title. |
| **My glyphs**                                                | Every glyph of the font. The ligatures come last, after the single characters.                                                                                              |
| A ligature's slot                                            | The **LIGA** badge in its corner. Its label is the sequence, with no code beside it.                                                                                        |
| The inspector on a ligature                                  | The Unicode values of the sequence joined by `+`, as in `U+0066+U+0069`, and **Ligature** where a character has its category.                                               |

Unicode blocks, categories and **All characters** list characters, so a ligature is never in them.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-7a667367ab481f65fc14e8b05fb221a5cc81c9a9%2Fligatures-my-glyphs-order.png?alt=media" alt="STILL | id: ligatures-my-glyphs-order | SHOWS: In My glyphs the ligature slots come after the last single character | FRAME: My glyphs in the viewport, labels on, scrolled to the end of the list so the last slots of single characters and the ligature slots after them are visible. Nothing selected | CROP: region: the last rows of the grid | NEEDS: at least two ligatures with outlines | SOURCE: Sample font, browser build"><figcaption><p>Characters first, sequences after.</p></figcaption></figure>

In **Ligatures**, the search field matches a ligature by any part of its sequence, uppercase and lowercase told apart: `ff` finds ff, ffi and ffl. The other search rules are on [Search & Selection](https://mkfont.gitbook.io/mkfont-docs/building-a-font/search-and-selection.md).

While the font has no ligature, the range reads **No ligatures yet** and offers **Find ligatures in a text**, which opens the **Ligature finder**. Ranges and what a slot draws are on [Browsing Glyphs](https://mkfont.gitbook.io/mkfont-docs/building-a-font/browsing-glyphs.md).

## Creating a ligature

*Each command builds a glyph whose slot is a sequence. They differ in where the sequence comes from and in what the glyph starts with.*

| Starting from                               | Command                                                     | The new ligature                                                                   |
| ------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Slots selected in the grid                  | **Create ligature from selection**, `Ctrl` + `L`            | No shape. **Auto width** on.                                                       |
| Slots selected in the grid                  | **Create ligature with components**, `Ctrl` + `Shift` + `L` | One component for each character of the sequence, set in a row.                    |
| Text selected in the **Text preview** panel | **Ligature**, or **+ components** beside it                 | The same as the matching command above.                                            |
| A text, or a list of sequences              | **Ligature finder**                                         | No shape. **Auto width** off, **Width** at the font's. Many ligatures in one pass. |

Every new ligature starts with a copy of the font's **Default transforms**.

Importing creates ligatures as well, as described on [Importing SVGs](https://mkfont.gitbook.io/mkfont-docs/import-and-export/importing-svgs.md) and [Importing from a Font File](https://mkfont.gitbook.io/mkfont-docs/import-and-export/importing-from-a-font-file.md): **Import SVG files** can assign a file to a ligature when the file's name spells several characters, and **Import glyphs from a font file** brings in the ligatures of that font file while **Include ligatures (from the GSUB liga feature)** is checked.

### From selected slots

The sequence is the selection, in the order the slots were selected. Click f, then `Ctrl`-click i, and the ligature is fi. Click i first and it is if. A range selected with `Shift` runs from the slot clicked first to the slot clicked last.

| Where                                  | Entry                                                                   |
| -------------------------------------- | ----------------------------------------------------------------------- |
| **Glyph** menu                         | **Create ligature from selection**, **Create ligature with components** |
| Context menu of the selection          | **Create ligature**, **Create ligature with components**                |
| Inspector, with several slots selected | **Ligature**. Its tooltip spells the sequence it will create.           |

All of them need more than one slot selected, and the menu commands are disabled while the viewport shows kerning pairs.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-c3e23121fa4a5db665b77f092e55ed3d96cb4005%2Fligatures-glyph-menu.png?alt=media" alt="STILL | id: ligatures-glyph-menu | SHOWS: The ligature commands of the Glyph menu with their shortcuts, enabled because two slots are selected | FRAME: My glyphs in the viewport with two slots selected. Glyph menu open, no entry hovered, showing Create ligature from selection, Create ligature with components and Ligature finder among its entries | CROP: menu | NEEDS: two letters with outlines that have no ligature together yet | SOURCE: Sample font, browser build"><figcaption><p>Two commands for a selection, and the finder for a batch.</p></figcaption></figure>

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-c429ba9889d2d372cccab6c20e1492826bec4309%2Fligatures-context-menu.png?alt=media" alt="STILL | id: ligatures-context-menu | SHOWS: The context menu of a selection of two slots offers both ways to create their ligature | FRAME: My glyphs in the viewport with two slots selected one after the other. Context menu open on the second, no entry hovered, showing Create ligature and Create ligature with components with their shortcuts, and the Kern entry under them | CROP: region: the menu and the slots around the one it was opened on | NEEDS: two letters with outlines that have no ligature together yet | SOURCE: Sample font, browser build"><figcaption><p>The entries appear once more than one slot is selected.</p></figcaption></figure>

A slot counts whether or not it has a glyph: the sequence is made of characters. A selected ligature counts as its whole sequence, so ff followed by i gives ffi.

{% hint style="info" %}

## A sequence that repeats a character

A slot is selected once, so a selection of single characters cannot spell ff or ee. Create those from text selected in the **Text preview** panel, or in the **Ligature finder**.
{% endhint %}

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-b16acc4c281356a16569da2468fa5bf1b07f14a5%2Fligatures-selection-before.png?alt=media" alt="STILL | id: ligatures-selection-before | SHOWS: Two slots selected in order, and the Ligature button of the inspector spelling the sequence it will create | FRAME: My glyphs in the viewport. Two letters selected, the one that comes first in the sequence clicked first. Inspector on the selection of two, pointer over the Ligature button so its tooltip shows the sequence | CROP: region: the viewport and the inspector | NEEDS: two letters with outlines that have no ligature together yet | SOURCE: Sample font, browser build | NOTE: The pointer is in the frame, over the Ligature button"><figcaption><p>The tooltip reads the selection in the order it was made.</p></figcaption></figure>

After the command, the new ligature is the selection, so the inspector shows it at once. Its slot is in **My glyphs** and in **Ligatures**. A Unicode block or a category has no slot for it, and the grid there shows nothing selected.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-8505b2f4b64ecc94cc7cde0667ae4338760adde5%2Fligatures-selection-after.png?alt=media" alt="STILL | id: ligatures-selection-after | SHOWS: Right after Create ligature from selection, the new ligature is selected, has no shape yet, and its Auto width is on | FRAME: Same font as ligatures-selection-before, right after clicking Ligature. My glyphs scrolled to the new ligature slot at the end of the list, selected, drawn without an outline and with its LIGA badge. Inspector on it: an empty glyph view, the identity line with the joined Unicode values, and the Transforms section with Auto width on | CROP: region: the viewport and the inspector | NEEDS: two letters with outlines that have no ligature together yet | SOURCE: Sample font, browser build"><figcaption><p>A slot for the sequence, waiting for its shape.</p></figcaption></figure>

If the font already has a ligature for the sequence, nothing is created or changed: the existing ligature is selected, and a toast says so. This holds for **Create ligature with components** too, which adds no component to a ligature that exists.

A creation is one step in the history, named **Create ligature** followed by the sequence.

### With components

**Create ligature with components** creates the ligature and builds it from the glyphs of its characters, one component each, in the order of the sequence. Each component starts where the one before it ends, so the letters line up in a row, at the size they have in their own glyphs.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-9069c324f0ebdceb3cde7a8b80bbc85e402b387f%2Fligatures-with-components-row.png?alt=media" alt="STILL | id: ligatures-with-components-row | SHOWS: A ligature made by Create ligature with components: one component for each character, set in a row | FRAME: A ligature of two characters created with Create ligature with components, selected. Glyph view showing the two letters side by side inside one advance box. Components section under it with two rows in the order of the sequence, both collapsed | CROP: region: the glyph view and the Components section | NEEDS: two letters with outlines that have no ligature together yet | SOURCE: Sample font, browser build"><figcaption><p>No shape of its own. The ligature is its letters, placed.</p></figcaption></figure>

The command sets the ligature up so that the row is measured as one shape:

| On the ligature | Set to                               | So that                                                                           |
| --------------- | ------------------------------------ | --------------------------------------------------------------------------------- |
| **Flatten**     | On, with the mode **Smart**          | The components are fitted together, and the advance is measured on the whole row. |
| **Scale**       | **Manual**, with a **Factor** of `1` | The parts keep the size they have in their own glyphs.                            |
| **Auto width**  | On                                   | The advance is as wide as the row, plus **Shift** and **Push**.                   |

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-afc2507717d99042586aa1d074fa3b9acad8ab35%2Fligatures-with-components-settings.png?alt=media" alt="STILL | id: ligatures-with-components-settings | SHOWS: What Create ligature with components sets on the ligature itself: Flatten on, Scale on Manual with a Factor of 1, Auto width on | FRAME: Same ligature as ligatures-with-components-row. Inspector scrolled so the Glyph section and the Transforms section are visible: Flatten on with its mode on Smart, Scale on Manual, Factor at 1, Auto width on | CROP: region: the Glyph section and the Transforms section | NEEDS: two letters with outlines that have no ligature together yet | SOURCE: Sample font, browser build"><figcaption><p>Set by the command, on top of the font's Default transforms.</p></figcaption></figure>

| On each component                              | Set to                                                                                  |
| ---------------------------------------------- | --------------------------------------------------------------------------------------- |
| **Glyph**                                      | One character of the sequence.                                                          |
| **Context anchor**                             | The bottom-left corner for the first component, the bottom-right corner for the others. |
| **Component anchor**                           | The bottom-left corner.                                                                 |
| The bounds of the context and of the component | **Imported bounds**.                                                                    |
| **Use previous component as context**          | On for every component after the first.                                                 |

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-e073e3d3abd9301f31f05d36a4a5192301f0b873%2Fligatures-with-components-second-row.png?alt=media" alt="STILL | id: ligatures-with-components-second-row | SHOWS: What Create ligature with components sets on every component after the first: context anchor at the bottom right, component anchor at the bottom left, Imported bounds on both, and the previous component as context | FRAME: Same ligature as ligatures-with-components-row. Second row of the Components section expanded, with its Special group open: Context anchor on bottom right, Component anchor on bottom left, both bounds on Imported bounds, Use previous component as context checked | CROP: region: the Components section | NEEDS: two letters with outlines that have no ligature together yet | SOURCE: Sample font, browser build"><figcaption><p>Each part hangs on the end of the one before.</p></figcaption></figure>

A character that has no glyph still gets its component. It is marked **missing** and draws once the glyph exists.

The ligature follows its parts: redraw one of the letters, or change its spacing, and the ligature changes with it. Why the settings above produce a row is on [Building with Components](https://mkfont.gitbook.io/mkfont-docs/how-mkfont-works/building-with-components.md), and every field of a component on [Components](https://mkfont.gitbook.io/mkfont-docs/building-a-font/glyph-inspector/components.md).

### From text in the Text preview panel

Drag across characters in the preview of the **Text preview** panel. The button under the preview reads **Select 2+ characters** until two characters or more are selected, then **Ligature** followed by the selected text in quotes. A long text is cut short in the label and used whole.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-1997c6c0f403f23c18373b234c2f5878b7c53f69%2Fligatures-preview-plus-components.png?alt=media" alt="STILL | id: ligatures-preview-plus-components | SHOWS: The + components button beside Ligature in the Text preview panel, enabled once text is selected, and its tooltip saying what it adds | FRAME: Sidebar on the Text preview panel. Two neighboring letters of one word picked by dragging across them in the preview. Ligature button reading Ligature followed by the two letters in quotes. Pointer over the + components button beside it, its tooltip reading Also add one component per character | CROP: region: the Ligature and + components buttons, with the last lines of the preview above them | NEEDS: enough glyphs with outlines to set a short sentence | SOURCE: Sample font, browser build | NOTE: The pointer is in the frame, over the + components button"><figcaption><p>One sequence, two ways to start it.</p></figcaption></figure>

| Button           | Creates                                                                        |
| ---------------- | ------------------------------------------------------------------------------ |
| **Ligature**     | The ligature of the selected text, as **Create ligature from selection** does. |
| **+ components** | The same ligature, built as **Create ligature with components** builds it.     |

* Spaces and line breaks inside the selected text are dropped, so a selection that runs over two words joins them into one sequence.
* The text is read as the preview shows it. With the panel's case option on **Uppercase**, the sequence is in capitals.
* The text is read character by character, so a repeated character is kept: ff is ff.
* Both buttons work whatever the viewport shows. From a pair view, the viewport switches to **Ligatures**.

The rest of the panel is on [Text Preview](https://mkfont.gitbook.io/mkfont-docs/building-a-font/text-preview.md).

## The Ligature finder

*A dialog that creates many ligatures in one pass, from the sequences a text repeats or from a list.*

Open it with **Import › Ligature finder** in the title bar, with **Glyph › Ligature finder**, or with **Find ligatures in a text** in a **Ligatures** range that lists nothing.

The box on the left takes the text, with one option and the thresholds under it. While it is empty it reads **Paste a text sample here**, or **One ligature per line** with a few examples once the option is checked. The list on the right shows what would be created. The footer counts the results and the picked ones, and holds the buttons.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-1e2626e5068821de4231a2e026cf98176cd7cb5c%2Fligatures-finder-empty.png?alt=media" alt="STILL | id: ligatures-finder-empty | SHOWS: The Ligature finder as it opens: a box for the text, the option and the thresholds under it, and an empty result list asking for text | FRAME: Ligature finder open, nothing typed. Text box showing its placeholder, Each line is a ligature unchecked, Min length 2, Max length 3, Min count 2. Result list reading Add some text to analyze. Footer reading 0 results and 0 selected, Create all and Create selected disabled | CROP: dialog | NEEDS: any font | SOURCE: Sample font, browser build"><figcaption><p>Nothing is created until one of the two buttons on the right is clicked.</p></figcaption></figure>

### Finding sequences in a text

Paste or type a text in the box. The finder cuts it into words at spaces, tabs and line breaks, then counts every run of neighboring characters inside each word. A sequence never runs from one word into the next.

| Field          | Does                                                            | Starts at |
| -------------- | --------------------------------------------------------------- | --------- |
| **Min length** | The shortest sequence counted, in characters. From 2 to 12.     | `2`       |
| **Max length** | The longest sequence counted. From 2 to 12.                     | `3`       |
| **Min count**  | How many times a sequence has to occur to be listed. 1 or more. | `2`       |

If **Min length** is above **Max length**, the finder reads them the other way round.

Runs overlap. With lengths from 2 to 3, the word office counts of, ff, fi, ic and ce, then off, ffi, fic and ice. Uppercase and lowercase are different characters, so Th and th are counted apart, and punctuation attached to a word is part of it.

Each result shows its sequence and the number of times it occurs, most frequent first. The list stops at 500 results, and the footer then reads `500 results (first 500)`.

A sequence the font already has a ligature for is dimmed and cannot be picked. Its tooltip reads **Already in the font**.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-da1481b43523a9c71579f11516c52ed4f4f107fe%2Fligatures-finder-results.png?alt=media" alt="STILL | id: ligatures-finder-results | SHOWS: Sequences found in a pasted text, most frequent first, each with how many times it occurs, some picked and some already in the font | FRAME: Ligature finder with a few paragraphs of text pasted, thresholds at their defaults. Result list filled with chips, each a sequence and its count. Three chips picked. At least one chip dimmed because the font has that ligature. Footer showing the result count, 3 selected, Create all with its count and Create selected (3) | CROP: dialog | NEEDS: at least two ligatures with outlines | SOURCE: Sample font + fixture: a few paragraphs of plain English text, browser build | NOTE: The two ligatures of the font are sequences that occur in the pasted text, so their chips are dimmed"><figcaption><p>Dimmed results are in the font already. The others are one click away.</p></figcaption></figure>

| The list reads                       | When                                                                                                                           |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| **Add some text to analyze.**        | The box is empty.                                                                                                              |
| **These settings yield no results.** | The box has text, and no sequence passes the thresholds. With **Each line is a ligature** checked: no line has two characters. |

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-4f2a4be0c804af8a04a1149df5dc446e063fa6ac%2Fligatures-finder-no-results.png?alt=media" alt="STILL | id: ligatures-finder-no-results | SHOWS: Thresholds too strict for the text: the list is empty and says the settings are the cause | FRAME: Ligature finder with a few paragraphs of text pasted and Min count raised above the count of the most frequent sequence. Result list reading These settings yield no results. Footer reading 0 results, both Create buttons disabled | CROP: dialog | NEEDS: any font | SOURCE: Sample font + fixture: a few paragraphs of plain English text, browser build"><figcaption><p>Lower Min count, or paste more text.</p></figcaption></figure>

### Listing ligatures one per line

Check **Each line is a ligature** and the box becomes a list: every line is one sequence, taken whole. The thresholds are disabled, the results carry no count, and they are listed in sorted order whatever the order of the lines.

* Spaces at both ends of a line are removed. Spaces inside it stay, as characters of the sequence.
* A line with fewer than two characters is ignored.
* A line written twice is listed once.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-0bfd497c602dd5dd46f39cb5b2f634384804990d%2Fligatures-finder-each-line.png?alt=media" alt="STILL | id: ligatures-finder-each-line | SHOWS: Each line is a ligature: every line of the box is one result, without a count, and the thresholds are disabled | FRAME: Ligature finder with Each line is a ligature checked and four sequences typed one per line, one of them a whole word. Min length, Max length and Min count dimmed. Result list showing one chip per line, without counts | CROP: dialog | NEEDS: any font | SOURCE: Sample font, browser build"><figcaption><p>A list goes in as written, however long each line is.</p></figcaption></figure>

### Picking and creating

Click a result to pick it, and again to drop it.

| Button              | Does                                                                                              |
| ------------------- | ------------------------------------------------------------------------------------------------- |
| **Create all**      | Creates a ligature for every listed result the font lacks. The number in parentheses is how many. |
| **Create selected** | Creates the picked results. The number in parentheses is how many.                                |
| **Cancel**          | Closes the dialog and creates nothing.                                                            |

Creating closes the dialog. The viewport switches to **Ligatures** with the new ligatures selected, and a toast gives their number, as in **Created 3 ligatures**. They are one step in the history, so one undo removes them all.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-0dc818b5ea45571de249600ea58ed67408af145f%2Fligatures-finder-created.png?alt=media" alt="STILL | id: ligatures-finder-created | SHOWS: After creating, the viewport is on Ligatures with the new ligatures selected, each an empty glyph, and a toast counts them | FRAME: Right after Create selected in the Ligature finder with three results picked. Browse panel on Ligatures. Viewport listing the ligatures, the three new ones selected and drawn as empty glyphs. Toast reading Created 3 ligatures on screen | CROP: region: the viewport and the toast | NEEDS: any font | SOURCE: Sample font + fixture: a few paragraphs of plain English text, browser build | NOTE: The toast is the subject, so it is on screen"><figcaption><p>Three slots, selected and ready for the inspector.</p></figcaption></figure>

Each new ligature is an empty glyph with **Auto width** off and its **Width** set to the font's, the same as a glyph made by **Create empty glyph**.

{% hint style="warning" %}

## Picks outlive the list

A picked result stays picked when the text or a threshold changes, including when it drops out of the list. **Create selected** creates it with the rest. The number on the button is the number of ligatures that will be created: read it before clicking.
{% endhint %}

## Giving a ligature its shape

*A ligature is fitted like any other glyph: a shape of its own, components, or both.*

Select the ligature and bring a shape in the way a character gets one: **Import an SVG into this glyph** or **Paste SVG markup from the clipboard** in the inspector, **Import SVG** in the slot's context menu, or an SVG file dropped on the slot. The ligature's transforms fit the shape, field by field as on [Transforms](https://mkfont.gitbook.io/mkfont-docs/building-a-font/glyph-inspector/transforms.md).

What the advance does next depends on how the ligature was created.

| Created by                                                                        | **Auto width** | Advance                                                                                                                                                             |
| --------------------------------------------------------------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Create ligature from selection**, or **Ligature** in the **Text preview** panel | On             | The glyph's **Width** while it has no shape, which is the font's **Width** until it is overridden. Then the width of the fitted shape, plus **Shift** and **Push**. |
| **Ligature finder**                                                               | Off            | The **Width** it was created with, whatever the shape measures.                                                                                                     |

{% hint style="warning" %}

## A ligature from the finder has a fixed width

Import a narrow shape into it and the advance stays at the font's **Width**, which leaves a gap after the ligature in text. Turn **Auto width** on in its **Transforms** section. The finder leaves the new ligatures selected, so the inspector can turn it on for all of them at once.
{% endhint %}

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-708d4903a9b6dadfcb11dc3d9830a6c85ea4b76e%2Fligatures-fixed-width.png?alt=media" alt="STILL | id: ligatures-fixed-width | SHOWS: A ligature created by the Ligature finder keeps the font Width after a shape is imported into it | FRAME: A ligature created by the Ligature finder, selected, with an SVG imported into it and nothing else changed. Glyph view showing a narrow outline at the left of an advance box as wide as the font Width. Transforms section with Auto width off | CROP: region: the glyph view and the Spacing group of the Transforms section | NEEDS: any font | SOURCE: Sample font + fixture: an SVG file of two joined letters, narrower than the font Width, desktop"><figcaption><p>Auto width off. The advance is the font's, and the shape sits at its left.</p></figcaption></figure>

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-06e715653b20ff1388056925de6fdd794a492258%2Fligatures-auto-width-on.png?alt=media" alt="STILL | id: ligatures-auto-width-on | SHOWS: With Auto width on, the advance of the same ligature closes in on its shape | FRAME: Same ligature and shape as ligatures-fixed-width, with Auto width on. Glyph view showing the advance box around the outline | CROP: region: the glyph view and the Spacing group of the Transforms section | NEEDS: any font | SOURCE: Sample font + fixture: an SVG file of two joined letters, narrower than the font Width, desktop"><figcaption><p>Auto width on. The advance follows the shape.</p></figcaption></figure>

When the font's **Monospace** option is on, a ligature has the font's **Width** like every other glyph, however many characters it replaces.

### From the glyphs of its characters

A ligature built from components needs no drawing of its own. **Create ligature with components** is the command that sets the parts in a row, and it acts only when it creates the ligature. On a ligature that exists, add the components in its **Components** section, give them the fields listed under [With components](#with-components), and turn **Flatten** on so that the advance is measured on the whole.

{% hint style="warning" %}

## Create from decomposition centers the parts

For a ligature, the decomposition is its sequence. **Create components from decomposition**, `Ctrl` + `K`, builds components from it the way it does for an accented letter: the first character becomes the control component, and the others are centered on it. The parts end up on top of each other.
{% endhint %}

## A ligature as a named part

*A ligature with Export off is a glyph with a name and no character: a place to keep a shape that other glyphs use.*

A shape that several glyphs share as a component has to be a glyph, and a glyph needs a slot. Taking the slot of a character puts a stray character in the font. A ligature needs no character, and its sequence can be any text of two characters or more, so it doubles as a name: `stem`, `ring`.

1. Create the ligature. In the **Ligature finder**, **Each line is a ligature** takes one name per line.
2. Give it its shape.
3. Turn **Export** off in its **Glyph** section.
4. Place it in other glyphs as a component.

With **Export** off, the ligature is left out of the font file and of the **Text preview** panel, and the glyphs that place it still draw it. Its slot is struck through.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-30fda771f083041907f7a62b4aa6f8b6b9081f57%2Fligatures-part-slot.png?alt=media" alt="STILL | id: ligatures-part-slot | SHOWS: A ligature kept as a named part: its sequence is a name, its Export is off, and its slot is struck through | FRAME: Ligatures in the viewport, labels on. One ligature selected whose sequence is a short word and whose outline is a part of other glyphs. Its slot struck through. Inspector showing the Glyph section with Export off | CROP: region: the selected slot with one neighbor, and the Glyph section of the inspector | NEEDS: a ligature whose sequence is a short word, with an outline and Export off, used as a component by at least two other glyphs | SOURCE: Sample font, browser build"><figcaption><p>In the project, under a name. Absent from the font file.</p></figcaption></figure>

{% hint style="warning" %}

## An exported name is a working ligature

With **Export** on, the font file carries the part as a ligature, and text that contains its name can show the part in place of those letters.
{% endhint %}

To place the part, type its name in the **Glyph** field of a component, as it was written when the ligature was created. **Pick a glyph**, beside the field, finds it too: type the name in the picker's search field. In the grid, the search field of **Ligatures** finds it the same way.

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-08562c7278908582cf7a087c7f9ff2357a219fc3%2Fligatures-part-component.png?alt=media" alt="STILL | id: ligatures-part-component | SHOWS: A glyph that places the named part as a component, with the name typed in the Glyph field of that component | FRAME: One glyph selected that uses the named ligature as a component. Components section with that row expanded, its Glyph field holding the sequence of the ligature. Glyph view drawing the part in place | CROP: region: the glyph view and the Components section | NEEDS: a ligature whose sequence is a short word, with an outline and Export off, used as a component by at least two other glyphs | SOURCE: Sample font, browser build"><figcaption><p>The name in the field is the whole reference.</p></figcaption></figure>

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-6efb029204c705331fc3d3892393612cb3239b69%2Fligatures-part-picker.png?alt=media" alt="STILL | id: ligatures-part-picker | SHOWS: The glyph picker finds the named part when its name is typed in the search field | FRAME: Glyph picker opened with the Pick a glyph button of a component, its source on In font, the name of the ligature typed in the search field, and the ligature listed first | CROP: dialog | NEEDS: a ligature whose sequence is a short word, with an outline and Export off, used as a component by at least two other glyphs | SOURCE: Sample font, browser build"><figcaption><p>A name is quicker to find than a code.</p></figcaption></figure>

The **Details** section of the part lists the glyphs that place it, under **Used as component**.

## What a ligature needs to work in text

*Each character of the sequence needs an exported glyph of its own, or nothing calls the ligature.*

An application turns each character into its glyph, then swaps a run of glyphs for the ligature. The swap starts from the glyphs of the characters, so the font file has to hold them.

| The ligature works when                                                            | Otherwise                                                                                                                                                                                                     |
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Its own **Export** is on.                                                          | It is left out of the font file.                                                                                                                                                                              |
| Every character of its sequence has a glyph, with **Export** on and within bounds. | The export finishes with a warning, explained on [Exporting](https://mkfont.gitbook.io/mkfont-docs/import-and-export/exporting.md). The ligature's glyph is written to the font file, and no text reaches it. |

An empty glyph is enough. A font of icons called by name needs a glyph for each letter of those names, and **Create empty glyph** makes one that draws nothing.

When a character is missing, the export toast reads **Exported**, the file name and **with 1 warning**, and lists the warning under it:

```
Ligature "fi" will not substitute: missing f
```

<figure><img src="https://1675470811-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwkWJ9v357hW91tto340i%2Fuploads%2Fgit-blob-5aab42edb6f775bf6ed8c19ce876ecf1a9e63416%2Fligatures-export-warning.png?alt=media" alt="STILL | id: ligatures-export-warning | SHOWS: The export toast when a character of a ligature has no exported glyph: a warning naming the ligature and the missing character | FRAME: Right after an export to a folder, with the glyph of one of the two characters of a ligature deleted for the frame. Toast reading Exported, the file name and with 1 warning, and under it the line naming the ligature and the missing character | CROP: region: the toast and the part of the window around it | NEEDS: a ligature of two characters with an outline | SOURCE: Sample font, desktop | NOTE: The toast is the subject, so it is on screen. The font has no other export warning"><figcaption><p>The font file was written. This ligature will stay unused in it.</p></figcaption></figure>

The toast lists the first four warnings of an export, so in a font with more, a ligature's warning can be among those left out.

An export without warnings counts the ligatures that will work, in the line under **Exported**.

When two ligatures begin with the same characters, the longer one comes first: with ligatures for ff and ffi, the text ffi gets the second.

The **Text preview** panel sets its text in the font as it stands and follows the same rule, so a sequence typed there shows its ligature before anything is exported.

A ligature can be the first or the second glyph of a kerning pair. A pair whose two glyphs spell the sequence of a ligature is never applied while ligatures are on, because the ligature has replaced both: see [Kerning](https://mkfont.gitbook.io/mkfont-docs/building-a-font/kerning.md).

## Deleting a ligature

*A ligature is deleted like any glyph, and its slot goes with it.*

Select it and press `Delete`, or choose **Delete glyph** in its context menu. The slot leaves **Ligatures** and **My glyphs**, and a toast offers **Undo**. The glyphs of its characters are untouched.

What referred to the ligature is kept: a component that placed it is marked **missing** until the ligature exists again, and a kerning pair that includes it waits the same way.

To delete every ligature, open **Ligatures** and choose **More actions › Delete all glyphs in view**. With text in the search field, the view is the matches, and only those are deleted.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mkfont.gitbook.io/mkfont-docs/building-a-font/ligatures.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
