Letter spacing (source code)

= Letter spacing
{wiki}

= Typographic tracking
{synonym}

\b[Letter spacing], also called <typographic tracking>, adjusts spacing within a run of text. It is distinct from <word spacing> and from context-sensitive <kerning>. In <CSS>, the `letter-spacing` property controls additional spacing, with rules that respect the writing system rather than blindly separating every stored character.<Text in Cascading Style Sheets Level 2 Revision 2 by World Wide Web Consortium>[§16.4: letter-spacing and distinction from kerning]{ref}<CSS Text Module Level 3 by World Wide Web Consortium>[§7.2: typographic character units and cursive scripts]{ref}

A simple model illustrates the geometry. Suppose four already shaped units have combined advance $A=30$, and three selected internal gaps each receive an extra $t=0.5$. Then
$$
\boxed{A'=A+3t=31.5.}
$$
This is an explicitly chosen three-gap model. A <glyph> need not correspond to one stored character, so counting source characters is generally insufficient to determine those gaps. <Text shaping>, <typographic ligatures> and the script's joining behaviour must be considered when deciding where spacing may change.