Tony Graham

Difficulty: ★☆☆ (easy)
Keywords: line height, leading, half-leading, font size

Problem

You want to change the leading between consecutive lines of text.

Solution

Leading is the distance from one baseline to the next, or in other words, the “interlinear space.” It is not the same as the line height. Unfortunately, the FO specification named the property for influencing the leading line-height which makes it confusing.

The DocBook stylesheets introduce the parameter line-height with the same name and functionality. It acts as a placeholder for the above line-height property. The following examples do all the same (except for the value normal). It is assumed, you have a base font size of 10pt; negative values in line-height are not allowed:

normal

This is the default value. The real value is set by the formatter and depends on the font size, usually it is a value between 1.0 and 1.2. Say more about the real value

Length

Sets the line height of the respective value:

<xsl:param name="line-height">12pt</xsl:param>

The leading is 2pt (12pt − 10pt).

Number

Sets the line height is the result of the value multiplied by the font size:

<xsl:param name="line-height">1.2</xsl:param>
Percentage

Sets the line height is the result of the percentage value multiplied by the font size:

<xsl:param name="line-height">120%</xsl:param>

Discussion

Unfortunately, the situation with line height in FO is a bit more complicated as it first seems. Usually, this is what most people expects:

First line
 [Gap]
Second Line
 [Gap]
Third Line
 [Gap]

However, the line-height property is a “half-leading” value which are added before and after a line. This leads to the more realistic picture:

 [1/2 Gap]
First line
 [1/2 Gap]
 [1/2 Gap]
Second Line
 [1/2 Gap]
 [1/2 Gap]
Third Line
 [1/2 Gap]

If the line height is constant in each line, the effect is the same (except at the top or bottom of a reference area). According to the FO specification of line-height the FO property is a compound datatype which has minimum, optimum, maximum, conditionally, and precedence. The minimum, optimum, and maximum constraints are length

That said, leading has a direct influence on how easy a text is read. If the value is too small, consecutive lines gets overlapped. If the value is too big, the cohersion of text gets lost. Most text requires positive leading. Usually 9pt/11pt, 10pt/12pt, 11pt/13pt, and 12pt/15pt are the most common (the two values depicting the font size and line height).

According to RobertBringhurst in his book The Elements of Typographic Style he recommends more lead in the following situations (cited from his book from page 37):

  • Dark faces need more lead than light ones

  • Large-bodied faces need more lead than smaller-bodied ones

  • Unserifed faces often need more lead (or a shorter line) than their serifed counterparts

  • Text with thickened by superscripts, subscripts, mathematical expressions, or the frequent use of full capitals

See Also


Project@GitHubIssue#9