---
title: "Leading in Typography: How Line Spacing Is Measured and Set - CE.SDK Glossary"
description: "Leading is the distance from one baseline to the next. Set it on a paragraph, convert it between InDesign, CSS, Figma and CE.SDK, and see how much text needs."
url: "https://img.ly/glossary/leading-typography/"
type: "page"
---

> This is the markdown version of [Leading in Typography: How Line Spacing Is Measured and Set - CE.SDK Glossary](https://img.ly/glossary/leading-typography/). For all pages in one file, see [llms-full.txt](https://img.ly/llms-full.txt). For an index of all available pages, see [llms.txt](https://img.ly/llms.txt).

---

# Leading (Typography)

Also known as: Line Height, Line Spacing

## What Is Leading in Typography?

Leading is the vertical distance from the baseline of one line of text to the baseline of the next, usually measured in points, so 12 pt type with 18 pt leading has its baselines 18 pt apart. The word comes from the strips of lead that printers put between lines of metal type, which is why it is pronounced "ledding", and CSS, Figma and CE.SDK call the setting line height.

### Set the leading of a paragraph

Move the slider or pick a preset, then switch the font to see why the CE.SDK value changes while the CSS value stays put.

The tool sets a 12 pt paragraph or a 30 pt headline at a line height from 0.8 to 2 times the font size and draws each line's box as CSS lays it out: the font's own line height in the middle, with the leading split above and below it. It writes the same spacing as print leading in points, CSS line-height, Figma line height and CE.SDK Line Height on the web, which divides by the font's own line height: Inter (1.21) and GT Walsheim Pro (1.15) times the font size.

## How Is Leading Measured?

Leading is measured from one baseline to the next, so it includes the height of the type itself. InDesign stores it in points, while CSS and Figma also take a multiple or a percentage of the font size, which keeps the spacing in proportion when the text is resized.

### Strips of lead between lines

Hand typesetters spaced lines of metal type with thin strips of lead, and the thickness of a strip was the leading. The word now covers the whole distance from baseline to baseline, so 10 pt type with 12 pt leading still has the 2 pt of the old strip between its lines.

### Auto leading at 120% of the type size

InDesign sets new text with auto leading of 120% of the type size, 12 pt for 10 pt type. That percentage is a setting, and it can be changed for text that needs more or less room.

### Negative leading

Leading smaller than the type size, such as 10 pt on 12 pt type, pulls the lines closer together than the type is tall. Only digital type allows it, and with little enough leading the ascenders of one line touch the descenders of the line above.

## Is Leading the Same as Line Height?

Yes, both name the distance between baselines, but each tool counts it from a different base, so one number can give different spacing. InDesign works in points, CSS and Figma multiply the font size, and CE.SDK on the web multiplies the font's own line height, the height from ascender to descender that the font file declares.

Tools also put the extra space in different places. CSS splits it into half-leading, half above each line and half below, so the first line of a paragraph gets space above it too, which the CSS text-box properties exist to trim. On the web, CE.SDK adds the space only between lines, so a one-line text block keeps its height when your users raise its Line Height.

- **InDesign leading**: The number is: Points from one baseline to the next, Default: Auto: 120% of the type size

- **CSS line-height**: The number is: A multiple of the font size, Default: normal: about 1.2, read from the font

- **Figma line height**: The number is: A percentage of the font size, or pixels, Default: Auto: the font’s own line height

- **CE.SDK Line Height on the web**: The number is: A multiple of the font’s own line height, Default: 1: the font’s own line height

## How Much Leading Does Text Need?

Running text needs a line height of at least 1.5 times the font size, while a heading of a line or two can sit much tighter. The width of the text column matters as well, so check the leading at the width the text will actually run.

### Paragraphs: at least 1.5

MDN's accessibility guidance and the U.S. Web Design System both ask for a line height of at least 1.5 in paragraphs. WCAG's text spacing criterion checks that a page still works when people raise it to 1.5 times the font size themselves.

### Headings: between 1 and 1.35

The U.S. Web Design System sets headings and other text no longer than a line or two between 1 and 1.35 times the font size. It keeps buttons and short labels at 1, which lines them up cleanly with the elements next to them.

### Long lines: more leading

The longer a line runs, the further the eye travels back to the start of the following line, which is why wide columns need more leading than narrow ones. Robert Bringhurst gives the same advice in The Elements of Typographic Style.

## Leading, Paragraph Spacing or a Line Break: Which Should You Change?

Change the leading when the lines inside a paragraph crowd together or drift apart, and the paragraph spacing when whole paragraphs run into each other. On a restaurant menu, for example, each dish description can keep a line height of 1.5 while a larger gap separates one dish from the next.

- **Lines inside a paragraph crowd together** — Raise the leading, which sets the distance from one baseline to the next within the paragraph.

- **Paragraphs run into each other** — Add paragraph spacing larger than the gap between lines, since WCAG’s enhanced guidance asks for at least 1.5 times the line spacing.

- **A two-line headline looks loose** — Tighten the leading of the headline alone, toward 1 to 1.35 times its size, and leave the body text as it is.

- **The lines of an address belong together** — Start each line with a line break instead of a new paragraph, so no paragraph spacing lands between them. In the CE.SDK web editor, Shift+Enter adds a line break.

## How Leading Works in CE.SDK

[CE.SDK](https://img.ly/products/creative-sdk.md) stores leading as Line Height, which your users set with a stepper among the advanced options for text in the web editor, next to Paragraph Spacing. On the web, Line Height multiplies the font's own line height and not the font size: at 1, the lines sit as close as the font file declares (1.21 times the size for Inter), and any extra space goes between them.

### Step 01: Read the font's own line height

Get the metrics of the block's font file and add up its ascender, descender and line gap. A block still on the engine's built-in default font has no font file, so give it a typeface first.

**Read the font's own line height**

```javascript
// Empty while the block uses the engine's built-in default font.
const uri = engine.block.getString(text, 'text/fontFileUri');
if (!uri) throw new Error('Give the text block a typeface first');

// Ascender to descender plus line gap, as a multiple of the
// font size: 1.21 for Inter.
const m = await engine.editor.getFontMetrics(uri);
const fontLineHeight = (m.ascender - m.descender + m.lineGap) / m.unitsPerEm;
```

### Step 02: Divide the design's line height by the font's own

A CSS line-height of 1.5 in Inter becomes a Line Height of 1.24, and the engine then spaces the baselines 1.5 times the font size apart. One paragraph can take its own value, such as a heading above the body text.

**Set the line height for the block and for one paragraph**

```javascript
// line-height: 1.5 in CSS is 1.5 times the font size.
engine.block.setFloat(text, 'text/lineHeight', 1.5 / fontLineHeight);

// A tighter heading: paragraph 0 only.
engine.block.setTextLineHeight(text, 1.1 / fontLineHeight, 0);
```

### Step 03: Convert paragraph spacing with the font's line height

Paragraph Spacing also multiplies the font's own line height, so a gap of one font size between paragraphs takes about 0.83 in Inter. It applies after each Enter but not after a Shift+Enter line break.

**Set the space after each paragraph**

```javascript
// A gap of one font size after each paragraph break (Enter).
engine.block.setFloat(text, 'text/paragraphSpacing', 1 / fontLineHeight);
```

[Understanding Text Rendering](https://img.ly/docs/cesdk/js/guides/text/rendering-internals-7c5c6a.md)

## FAQs

### Leading

**Q: What is the difference between leading and line spacing?**

A: They name the same distance between lines of text. Typographers and InDesign call it leading and measure it in points from one baseline to the next, word processors call it line spacing, and CSS, Figma and CE.SDK call it line height.

**Q: What is a good leading for body text?**

A: At least 1.5 times the font size for paragraphs, which is what MDN and the U.S. Web Design System recommend, so 12 pt text gets 18 pt leading. Text set in long lines can take more, and a short heading can sit much tighter.

**Q: What does auto leading mean?**

A: It is a line height the software works out for you. InDesign's auto leading is 120% of the type size, the CSS value normal comes from the font and lands near 1.2 in desktop browsers, and Figma's Auto uses the font's own line height.

**Q: What is negative leading?**

A: Leading smaller than the type size, such as 10 pt leading on 12 pt type, which only digital type allows. The lines then sit closer together than the type is tall, so a tall letter in one line can touch a descender in the line above.

**Q: Why does text in the browser look more spaced than in my design?**

A: CSS adds half of the leading above each line and half below, so a paragraph also gets space above its first line and below its last. A tool that puts the space only between lines, as CE.SDK does on the web, leaves those two edges without it, so the same paragraph comes out taller in the browser.

## Links

- [Creative Editor SDK](https://img.ly/products/creative-sdk.md): A Line Height stepper, with Paragraph Spacing beside it, sits among the web editor's text options for your users.
- [Understanding Text Rendering](https://img.ly/docs/cesdk/js/guides/text/rendering-internals-7c5c6a.md): See how a font's metrics set the height of a line and how the Line Height multiplier spaces the lines.
- [Edit Text](https://img.ly/docs/cesdk/js/text/edit-c5106b.md): Edit text on the canvas or in code, and read each visible line's position and the font's metrics.

---

## More Resources

- **[IMG.LY Website](https://img.ly/index.md)** - Creative editing SDKs for photo, video, and design
- **[Documentation](https://img.ly/docs/cesdk/)** - CE.SDK developer documentation
- **[Build with a coding agent](https://img.ly/SKILL.md)** - A skill that adds a CE.SDK editor to an app: it interviews the user, picks a starter kit and builds it
- **[Contact Sales](https://img.ly/forms/contact-sales.md)** - Get a custom quote. A public JSON API accepts the request directly, no account or key needed. Ask your user for consent and their details first.
- **[Free Trial](https://img.ly/pricing.md)** - Start building with CE.SDK
