Glyph

On this page 7

A glyph is the specific visual shape that a font uses to render a character, a combination of characters or a symbol. In typography the distinction is fundamental: a character is an abstract unit of meaning, such as the lowercase letter a, while a glyph is one particular drawing of it. A single character can have many glyphs, and one glyph can represent several characters, as a ligature does.

Glyphs are the actual contents of a font file. Every outline, its advance width, its side bearings and its position relative to the baseline are stored per glyph, and the text rendering engine decides which glyph to show for each character in a given context. Understanding this layer explains why the same text can look different across fonts, languages and software.

How a glyph differs from a character

The Unicode Standard encodes characters, not glyphs. It assigns each character a code point, such as U+0061 for the Latin small letter a, and leaves its appearance entirely to fonts. A font then maps code points to glyphs through its character map, the cmap table in OpenType, so that typing a letter produces a visible shape.

This separation allows one-to-many and many-to-one relationships. The letter a may appear as a double-story form in roman, a single-story form in italic and a swash form in a display style, all as distinct glyphs. Conversely, the sequence f and i may be drawn as a single fi ligature glyph. The table compares the three related concepts that are most often confused.

ConceptDefinitionExample
CharacterAbstract unit of text with a code pointU+0061 Latin small letter a
GlyphConcrete visual shape stored in a fontSingle-story italic a
GraphemeSmallest unit a reader perceives as one lettere with acute accent
Character, glyph and grapheme compared

Anatomy and metrics of a glyph

Each glyph is defined by an outline and a set of metrics. The outline is drawn with quadratic Bezier curves in TrueType-flavored fonts or cubic Bezier curves in CFF-flavored fonts, inside a coordinate grid called the em square. The em square commonly measures 1,000 units for CFF fonts and 2,048 units for TrueType fonts, and every metric is expressed in these units.

Metrics determine how glyphs sit next to each other. The advance width sets how far the pen moves after drawing the glyph, while side bearings control the default space on its left and right. Vertical metrics such as x-height, cap height, ascender and descender come from the font as a whole but are realized in individual glyph shapes. The table lists the key per-glyph measurements.

MetricWhat it measuresEffect on text
Advance widthHorizontal distance to the next glyph originOverall text width and rhythm
Left side bearingSpace between origin and outline startDefault spacing before the glyph
Right side bearingSpace after the outline endsDefault spacing after the glyph
Bounding boxSmallest rectangle around the outlineClipping and collision checks
Kerning valueAdjustment for a specific glyph pairEven spacing in pairs such as AV
Key glyph metrics and their effect

Types of glyphs in a modern font

A professional OpenType font contains far more glyphs than there are keys on a keyboard. A basic Latin font may hold around 250 glyphs, an extended Latin, Greek and Cyrillic family often exceeds 1,000, and a CJK font for Chinese, Japanese and Korean can contain tens of thousands of glyphs, close to the format limit of 65,535 glyphs per font.

Many of these glyphs have no code point of their own and are reached only through OpenType layout features. The table groups the most common glyph types and shows how a user or application accesses them.

Glyph typePurposeTypical access
Base glyphsDefault letters, digits and punctuationDirect character mapping
LigaturesMerge sequences such as fi or fflliga and dlig features
AlternatesStylistic or swash variantssalt, ss01 to ss20, swsh
Figure stylesOldstyle, lining, tabular digitsonum, lnum, tnum
Small capitalsTrue capitals at x-height sizesmcp and c2sc
Combining marksAccents positioned over base glyphsmark and mkmk features
Contextual formsInitial, medial and final shapesinit, medi, fina in Arabic
Common glyph types and how they are accessed

How software selects and renders glyphs

Turning characters into glyphs is the job of a text shaping engine, such as HarfBuzz, DirectWrite or Core Text. The engine reads the character sequence, applies the script rules, consults the font’s GSUB table for substitutions and the GPOS table for positioning, and outputs a list of glyph identifiers with exact coordinates.

Shaping is essential for complex scripts. In Arabic, one letter may take four different glyph forms depending on its position in a word, and in Devanagari, consonant clusters combine into conjunct glyphs. Without correct shaping, text in these scripts is unreadable or wrong, even when every code point is correct.

After shaping, a rasterizer converts glyph outlines into pixels. At small sizes, hinting instructions or automatic grid fitting adjust outlines to the pixel grid, and antialiasing smooths edges. This is why the same glyph can look slightly different on Windows, macOS and in a printed PDF.

Missing glyphs and common glyph problems

When a font lacks a glyph for a character, the system shows a notdef glyph, often an empty rectangle nicknamed tofu, or silently substitutes a fallback font. Fallback keeps text readable but can break visual consistency, especially in headlines and brand materials.

  • Choosing fonts without checking language coverage, which causes tofu boxes for accented or non-Latin names.
  • Faking small capitals or italics by scaling or slanting regular glyphs, which distorts stroke weight.
  • Subsetting web fonts too aggressively, removing glyphs that user-generated content later needs.
  • Assuming one keystroke equals one glyph, which breaks cursor movement, counting and text truncation logic.
  • Disabling ligatures in code fonts or body text without considering readability and intent.

In everyday language

A glyph is the picture of a letter, while the letter itself is the idea behind it. The letter g means the same thing in every book, but one font may draw it with two loops and another with a single open tail. Each of those drawings is a glyph.

You can think of a font as a box of rubber stamps. The text says which letters you want, and the computer picks the right stamp for each one. Sometimes it even picks a special stamp that joins two letters together because they look better that way.

Seen in the real world

A publishing team prepares an academic book with author names in Polish, Vietnamese and Czech, plus chapter epigraphs in Greek. The chosen text face looks elegant, but the first proof shows empty boxes and mismatched letters where names contain characters such as Vietnamese stacked diacritics.

The typographer inspects the font in a glyph viewer and finds about 400 glyphs, covering only Western European languages. The team switches to a family with roughly 1,800 glyphs, including extended Latin, Greek and properly positioned combining marks, and enables oldstyle figures and small capitals through OpenType features in the layout software.

The second proof shows every name drawn in the same style, with correct accents and no fallback substitutions. The result is a consistent, accurate text block, achieved by checking glyph coverage before typesetting rather than after.