Back to Glossary
Design & Typography

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.

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.

What each tool's line height number means, and what it starts at
  The number is Default
InDesign leading Points from one baseline to the next Auto: 120% of the type size
CSS line-height A multiple of the font size normal: about 1.2, read from the font
Figma line height A percentage of the font size, or pixels Auto: the font’s own line height
CE.SDK Line Height on the web A multiple of the font’s own line height 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 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
// 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
// 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
// A gap of one font size after each paragraph break (Enter).
engine.block.setFloat(text, 'text/paragraphSpacing', 1 / fontLineHeight);
Understanding Text Rendering

FAQs

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.

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.

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.

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.

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.