Ascender (typography) 2026-11-05
An ascender is the part of a lowercase glyph that extends above the main lowercase body, whose reference height is the x-height. Familiar examples occur in “b”, “d” and “k”. It is a feature of a particular drawn form, rather than a promise that every glyph in the font reaches the same height.[ref]
A Glossary of Typographic Terms by Adobe. Entry ascender
In a hypothetical computer font, put the text baseline at , the x-height at 450 font units and the top of a chosen ascender at 730 font units. That part extends 280 font units above the lowercase reference. With 1000 font units per em and a scale of 20 pixels per em, the corresponding ideal heights above the text baseline are 9 and 14.6 pixels.
This local geometry is distinct from the global font ascent used by a text-layout system. That metric can also accommodate accents or other tall forms. Glyph positioning must preserve the chosen text baseline while allowing these different bounding boxes; simply aligning the tops of all glyphs would change the intended alignment.
Cap height 2026-11-05
The cap height is the reference height of ordinary unaccented capital letters above a text baseline. It describes uppercase letter design, while the x-height concerns the main lowercase body. A font ascent can reserve more space for accents or other tall forms than the cap height alone requires.
OpenType records a nominal cap height in the
sCapHeight field of its OS/2 metrics table, in font units. The metric is an approximation for the uppercase design, so taking the largest ink bounding box among every uppercase glyph need not give the intended value.[ref]OS/2 and Windows Metrics Table by Microsoft. sCapHeight: approximate height of unaccented uppercase letters
For a hypothetical computer font with cap metric 700 and 1000 font units per em, the reference height at 18 pixels per em is 12.6 pixels before grid fitting. An ascent metric of 800 font units would instead reserve 14.4 pixels above the text baseline. These describe different geometric features of the same design.
Aligning a capital heading against an icon can therefore require choosing which reference matters: the text baseline, the nominal cap height, or a measured ink bounding box. Keeping those quantities separate makes the alignment rule reproducible.
CSS leading 2026-11-05
CSS leading is the extra allowance around the font ascent and font descent when CSS constructs the vertical extent associated with a glyph. Let be the positive ascent, the positive descent magnitude and the selected line height, all at the same font size and in the same units. The extra leading and the resulting extents above and below the text baseline areThe half-leading is a layout allocation. It need not be a visible blank strip, and may be negative.[ref]
This explains a subtle effect of mixing fonts. In a simple baseline-aligned line containing only ordinary text CSS inline boxes, include the block's CSS strut among the contributions indexed by . The CSS line box must extend far enough in each direction, givingThe two maxima can come from different contributions. Suppose one has CSS pixels, giving , while another has , giving . If the CSS strut adds no larger extent, the resulting CSS line box is CSS pixels high, exceeding both declared line heights. The assumption of a common text baseline matters: other vertical alignments and inline objects require the fuller layout rules.[ref]
Visual formatting model details in CSS 2.2 by W3C. §10.8, uppermost and lowermost box edges; §10.8.1, block-container strut
Thus a stored font line gap, an individual line height declaration and the final CSS line box height are distinct quantities. Comparing only nominal font sizes cannot explain the mixed-font result.
CSS line box 2026-11-05
A CSS line box is the rectangular region containing the inline content of one line in a CSS inline formatting context. The browser fits successive inline content into lines, using line breaking when necessary, then uses CSS vertical alignment to determine each line's extent. A CSS inline box supplies one contribution to this enclosing region.[ref]
For ordinary baseline-aligned text, the CSS leading calculation supplies each contribution's height above and depth below the text baseline. Include the CSS strut among those contributions. Enclosing them requiresFor example, extents and CSS pixels produce a line of CSS pixels, although the individual extents sum to 14 and 20. The largest upper extent and largest lower extent can come from different contributions. The CSS leading diagram illustrates the same geometry with another pair of hypothetical metrics.
A CSS replaced element, such as an inline image, contributes according to its CSS margin box; it need not follow the text's line height. Other settings of CSS vertical alignment require additional positioning rules. These effects explain why a line's final height can exceed the
line-height declared on its surrounding CSS block container.[ref]Visual formatting model details in CSS 2.2 by W3C. §10.8, sizing and vertical alignment of inline-level boxes
CSS strut 2026-11-05
A CSS strut is the imaginary zero-width CSS inline box used to represent a CSS block container's own font and line height when a CSS line box is constructed. It supplies minimum extents on both sides of the text baseline, even when the actual text uses smaller metrics.[ref]
Visual formatting model details in CSS 2.2 by W3C. §10.8.1, imaginary strut and block-container line-height
Suppose the container has font ascent , font descent magnitude and line height CSS pixels. Its CSS leading is , so the strut contributes 14 above and 6 below the text baseline. A small text contribution with extents 7.5 above and 2.5 below still produces a line 20 CSS pixels high because the strut dominates both directions.
The minimum is geometric rather than merely a comparison of total heights. If another contribution extends 18 above and 2 below the same text baseline, the enclosing CSS line box becomes CSS pixels. Both the strut and the other contribution individually total 20. Keeping the separate upper and lower extents explains the extra height.
This construction concerns a CSS line box that participates in layout. CSS also specifies conditions under which empty line boxes are treated as nonexistent, so
line-height:20px alone does not make every otherwise empty block 20 CSS pixels high.[ref] Descender 2026-11-05
A descender is the portion of a glyph that extends below the text baseline. Lowercase “p”, “q” and “y” commonly have one; the exact form depends on the typeface. A descender describes the visible shape relative to the writing reference, rather than the distance through which the logical pen position advances.[ref]
A Glossary of Typographic Terms by Adobe. Entry descender
For an original coordinate example, take a text baseline at with positive upward. If a glyph's lowest ink point is font units, its downward extent is 180 font units. At a scale of 20 pixels per em with 1000 font units per em, this becomes 3.6 pixels before grid fitting. The extent is positive even though the lowest coordinate is negative.
The font descent is a related global layout metric, with sign conventions that depend on the format or API. It need not equal the downward extent of each individual descender. Line height and neighbouring ink extents together determine whether forms on successive lines collide; the nominal font size alone does not decide that.
Font ascent 2026-11-05
The font ascent is an upward metric measured from a text baseline and used when allocating vertical space for a font. It describes the font's layout metrics as a whole, rather than the visible ascender of one particular glyph. A short letter, a tall letter and an accented form can therefore share the same font ascent while having different ink bounding boxes.[ref]
Suppose a computer font has a chosen font ascent of 800 font units and 1000 font units per em. At 20 pixels per em, the scaled upward metric is 16 pixels. This calculation allocates a reference extent; it does not assert that the letters being drawn actually reach 16 pixels above the text baseline.
The field used must be stated. OpenType provides
ascender in hhea and sTypoAscender in OS/2, while some older layout paths use other metrics. The sTypoAscender, sTypoDescender and sTypoLineGap fields are intended to work together for typographic line spacing. Their ascent-minus-descent need not equal unitsPerEm.[ref]OS/2 and Windows Metrics Table by Microsoft. sTypoAscender: default line spacing, legacy differences and independence from unitsPerEm
Combining a font ascent with the corresponding font descent and font line gap gives a consistent basis for choosing line height. Mixing fields chosen under different conventions can instead change the spacing even when the nominal font size is unchanged.
Font descent 2026-11-05
The font descent supplies the below-text baseline part of a font's vertical layout metrics. It must be distinguished from the descender of an individual glyph. The coordinate convention also matters: a downward extent can be represented as a negative coordinate in a system whose vertical axis points upward, or as a positive distance in another API.[ref]
Glyph Metrics in the FreeType documentation. Section2: descent sign in FreeType and other font formats
For example, a signed descent font units represents a downward extent font units. With 1000 font units per em and 20 pixels per em, its magnitude scales to 4 pixels. Calling that a negative height would confuse the coordinate with the distance being allocated.
Using a signed descent, an ascent and a font line gap in the same font units givesEquivalently, if is the positive downward extent, the same line height is . This is the elementary typographic spacing model; the rendering system's choice of metrics must still be respected.[ref]
Glyph Metrics in the FreeType documentation. Section2: linespace = ascent - descent + linegap
A computer font can contain several descent-related fields. For example, OpenType's
hhea header stores a typographic descender; an application must not infer the sign and purpose of every other API field merely from the word descent.[ref]Horizontal Header Table by Microsoft. descender and lineGap fields; remarks on platform-specific interpretations
Font line gap 2026-11-05
A font line gap is a font-wide metric giving an additional spacing allowance to combine with font ascent and font descent. For an elementary default line-spacing calculation using signed descent ,where is the ascent and the font line gap. OpenType's
sTypoLineGap is intended to be used with the matching sTypoAscender and sTypoDescender fields.[ref]OS/2 and Windows Metrics Table by Microsoft. sTypoLineGap and its relationship to the other typographic metrics
Suppose the chosen metrics are , and font units. The default spacing is 1100 font units. With 1000 font units per em at 18 pixels per em, that is 19.8 pixels between text baselines.
The stored font line gap provides an input to a spacing decision. An application can instead request a different line height, and CSS leading is then calculated from that requested height and the selected metrics. Nor does the font line gap measure the visible blank strip between every pair of lines: the ink bounding boxes vary with the particular glyphs. The line height diagram shows this distinction with schematic ink inside larger font-wide metric regions.
Font size 2026-11-05
The font size sets the nominal scale at which a font is used. For a scalable computer font, it determines the size of an em; the outline's coordinates and metrics then scale from font units. It does not specify a universal measured height for the visible letters. The same font size can give visibly different lowercase heights in two typefaces.[ref]
CSS Fonts Module Level 4 by W3C. Section2.5: definition of font-size and the note about EM boxes and apparent size
For a concrete geometric example, suppose two computer fonts have x-heights equal to 0.45 and 0.60 of an em. At a nominal 16 pixels per em, the ideal scaled heights are 7.2 and 9.6 pixels, respectively. Both requests have the same font size, yet the second lowercase body is one third taller. These are hypothetical metrics, before grid fitting.
Equal font sizes can produce different x-heights
. Original toy letterforms with x-heights of 0.45 and 0.60 em at a nominal scale of 16 pixels per em. The ideal heights are 7.2 and 9.6 pixels; these are schematic shapes rather than measured computer fonts or a demonstration of rasterization. Details.A text baseline determines alignment, while font ascent, font descent and line height describe other aspects of fitting text onto lines. Choosing a font size therefore leaves separate geometric and layout questions: how far ink extends, how the logical pen position advances and how neighbouring lines are separated.
Glyph connector 2026-11-05
A glyph connector is the end portion of a glyph part intended to overlap a neighbouring part in a mathematical glyph assembly. An OpenType MATH table gives start and end connector lengths along the extension direction: left/right for a horizontal assembly and bottom/top for a vertical one.[ref]
MATH - The Mathematical Typesetting Table by Microsoft. GlyphAssembly; GlyphPart startConnectorLength and endConnectorLength
Let adjacent parts have full advances , joining connector lengths , and minimum overlap . An allowed overlap must satisfyThe bounds come from the available connector material and
minConnectorOverlap.[ref]MATH - The Mathematical Typesetting Table by Microsoft. MathVariants minConnectorOverlap; GlyphAssembly overlap constraints
For invented dimensions in font units, choose , , , and . Then , giving . A target extent 1030 requires overlap 70 and is feasible. A target extent 1000 requires overlap 100, exceeding the second connector's length, so this pair cannot produce it.
These are construction advances, rather than measured ink bounds. Connector data permit controlled changes of extent while other geometry keeps the parts aligned. The mathematical glyph assembly still needs placement relative to the text baseline.
Glyph positioning 2026-11-05
Glyph positioning assigns locations to the glyphs selected during text shaping. It specifies how each glyph is placed and how the logical pen position progresses through the text. A text baseline supplies a common reference for placing the shapes. An OpenType GPOS table can adjust horizontal and vertical placement, glyph advances and attachment between selected glyphs.[ref]
Glyph Positioning Table by Microsoft. Overview, ValueRecords and positioning/attachment lookup types
A simple coordinate model separates the two effects. Let be the pen position, a placement offset and the glyph advance. Draw glyph with its origin atthen update the logical position byChanging moves the current shape; changing moves the starting position of subsequent shapes.
For example, a combining character can select an accent glyph that must be positioned above an earlier base glyph. The accent's placement and its glyph advance answer different questions. Kerning similarly changes spacing according to context, while glyph substitution changes which forms are selected. These choices precede the rasterization of the placed outlines into pixels.
Leading (typography) 2026-11-05
Typographic leading concerns vertical spacing between lines of type. The term comes from the thin lead spacers used to separate lines of metal type. In current discussion, one must establish whether a quoted value means the complete spacing between text baselines or an additional allowance beyond the chosen font ascent and font descent.[ref]
A Glossary of Typographic Terms by Adobe. Entry leading: line spacing and the historical lead spacers
CSS leading uses the additional-allowance convention. If a single font contributes ascent and descent magnitude , and the chosen line height is , thenThe elementary inline-box construction allocates half of above the ascent and half below the descent. These quantities are font-wide metrics, rather than the actual ink bounding box of each glyph.[ref]
For hypothetical metrics , and CSS pixels, the extra leading is 4 CSS pixels, with 2 on each side. If the same metrics use , then : the allocated line region is smaller than the metric extent. Negative CSS leading is allowed, so visible ink can extend outside its line allocation. A line height value must consequently be interpreted together with the font and the layout convention.
Line height 2026-11-05
The line height governs the vertical spacing allocated to a line of text. For a simple repeated run with fixed metrics, it sets the distance from one text baseline to the next. The gap between visible ink is a separate quantity, because different glyphs need not fill their allocated vertical region.
In an elementary single-font model, let be the positive font ascent, the positive magnitude of the font descent, and an added font line gap. ThenFor hypothetical metrics , and font units, font units. With 1000 font units per em and 20 pixels per em, the text baselines are 24 pixels apart. The line height can thus exceed the nominal font size.
CSS lays out inline content through line boxes. Its
line-height participates in that calculation, and a block's declared value sets a minimum rather than guaranteeing that every mixed-content line has exactly that height. A taller inline object or a different alignment can enlarge a line box. The specification also describes how extra typographic leading is split above and below the chosen font metrics.[ref]Visual formatting model details in CSS 2.2 by W3C. Sections10.8–10.8.1: line-box construction, leading and the block-container minimum
The useful distinction is between the nominal font size, the font ascent and font descent used for layout, and the actual ink bounding boxes. They answer different geometric questions even when they are expressed in the same units.
Mathematical glyph assembly 2026-11-05
A mathematical glyph assembly constructs an extended mathematical shape from positioned glyph parts. An OpenType MATH table records each part's full advance and glyph connectors; extender parts may repeat, with overlaps joining neighbouring pieces.[ref]
MATH - The Mathematical Typesetting Table by Microsoft. GlyphAssembly table; GlyphPart records and minConnectorOverlap
For an invented vertical assembly, take bottom, middle and top parts with advances 500, 400 and 500 font units. Give each joining connector length 150 and require at least 80 font units of overlap. Choosing overlaps of 100 is then allowed. Starting at zero puts the parts at offsets 0, 400 and 700, giving total extentRepeating the middle part once, with another 100-unit overlap, adds and gives extent 1500. These are construction measurements along the growth direction, not a claim about a particular font's ink bounds. Positioning the assembled shape relative to the text baseline remains a separate layout choice.
Mathematical typesetting 2026-11-05
Mathematical typesetting arranges symbolic expressions in two dimensions. It must coordinate computer fonts, glyph positioning, typesetting boxes and text baselines while preserving the expression's visible structure. A typeset fraction positions its components above and below a bar; superscripts, subscripts, square roots and mathematical delimiters impose other geometric relationships.[ref]
MATH - The Mathematical Typesetting Table by Microsoft. Overview: hierarchical formulas, recursive layout and component boxes
For example,contains a superscript inside the upper component and a square root inside the lower component. Their dimensions help determine the height of the complete typeset fraction. A larger expression may then require larger surrounding mathematical delimiters. Laying out the smallest parts first makes this a recursive geometric construction.
An OpenType MATH table supplies font-specific information such as placement constants and suitable glyph variants. The table supplies data for layout; different implementations can use those data in different algorithms. TeX and LaTeX provide established authoring systems for expressing such mathematical structure.[ref]
MATH - The Mathematical Typesetting Table by Microsoft. Overview and MATH table structures: font data rather than a complete layout algorithm
Mathematical typesetting axis 2026-11-05
The mathematical typesetting axis, or Math axis, is a horizontal alignment reference for a formula. Its offset from the text baseline is a mathematical font constant, represented by
axisHeight in an OpenType MATH table.[ref]MATH - The Mathematical Typesetting Table by Microsoft. MathConstants: axisHeight and baseline offset
For an invented coordinate example, choose upward-positive coordinates, put the text baseline at , and set the axis offset to font units in a computer font with 1000 font units per em. At 20 pixels per em, the axis is pixels above that baseline. A symmetric enclosing shape spanning to has midpoint , so its centre lies on the axis.
The typeset fraction bar is another useful alignment cue. The reference fixes relative placement; translating the whole formula also translates its baseline and axis.
Mathematical typesetting style 2026-11-05
A mathematical typesetting style selects layout conventions appropriate to a formula's context, including compact inline material and more spacious displayed material. In MathML,
math-style distinguishes normal and compact, while math-depth participates in nested size selection.[ref]Compare two presentations of the same expression:Both represent the same quotient, but reserve different vertical space. In TeX,
\displaystyle and \textstyle request these contexts. The choice matters when fitting a typeset fraction into a line without making neighbouring text baselines unnecessarily far apart.For a hypothetical computer font with first- and second-level script scales 80 and 60 percent, a base font size of 20 units gives script sizes 16 and 12. The second value is relative to the base, so it is not . Actual percentages come from the computer font's mathematical font constants.[ref]
MathML Core by World Wide Web Consortium. §4.5: ScriptPercentScaleDown and ScriptScriptPercentScaleDown
MathML Core 2026-11-05
MathML Core is a browser-oriented subset of MathML with specified rules for mathematical presentation and layout. The pinned 24 June 2025 document is a Candidate Recommendation Snapshot. It defines a concrete target for implementation, rather than identifying the whole MathML language with one browser's output.[ref]
MathML Core by World Wide Web Consortium. Abstract; Status of This Document; §2.1 elements and attributes
For an original example, encode a typeset fraction surrounded by parentheses as
<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mo stretchy="true">(</mo><mfrac><mi>x</mi><mn>2</mn></mfrac><mo stretchy="true">)</mo></mrow></math>. The row has three children: a left mathematical delimiter, the typeset fraction and a right mathematical delimiter. The fraction's children supply numerator and denominator 2.The parentheses are stretchy mathematical operators: their markup requests size-sensitive layout around the fraction. Core specifies operator stretching and row layout; mathematical glyph variants or mathematical glyph assemblies can supply suitable forms.[ref]
MathML Core by World Wide Web Consortium. §§3.2.4.3, 3.3.1.1 and3.3.2: operator layout, stretching and fractions
This illustrates why presenting a formula requires more than placing all its characters on one text baseline.Changing
stretchy="true" to stretchy="false" changes the layout instruction without changing the fraction's two operands. Exact dimensions also depend on the computer font and applicable layout properties. The markup supplies structure and presentation instructions; substituting a numerical value for and evaluating the quotient is a separate operation. Pen position 2026-11-05
In glyph positioning, the pen position is the logical point from which the next glyph is placed. The word pen describes a layout convention: the renderer can draw an outline or a collection of pixels rather than trace a physical pen stroke. Simple horizontal layout places this reference point on the text baseline.[ref]
Glyph Metrics in the FreeType documentation. Section 1: the baseline and logical origin; section 3: advances
Let be the current pen position, a placement offset and the resolved glyph advance. The current glyph's drawing origin and the next logical point are, respectively,For example, in one horizontal coordinate system, , and draw at but leave the next logical point at . Moving the current shape and changing the progression of the run are separate operations.
A glyph's bounding box is therefore not a substitute for its pen position. A left side bearing can leave space between the logical origin and the ink, and a right side bearing records how the ink ends relative to the default advance. Kerning or attachment of a combining character can modify the placement or progression without changing the stored outline.


