Definition and Usage
The font-kerning property specifies whether to use the kerning information stored in a font.
Kerning
'Kerning' refers to adjusting the spacing between adjacent characters to make them appear more balanced and natural.
When letters are placed side by side, their shapes can sometimes make the spacing look uneven. Kerning intentionally adjusts the spacing so the letters tuck together, creating a more balanced and visually pleasing arrangement.
For example, when the letters V and A are placed together, the space between them can look unusually wide. When kerning is applied, the spacing is adjusted so they fit together naturally. This isn't just about moving the letters closer together—it's about making the text appear balanced and harmonious.
Kerning relies on kerning data stored directly inside the font file. The font designer decides whether to include this kerning data, which means not all fonts provide kerning data.
Keep in mind that fonts without built-in kerning data cannot apply kerning.
The spacing between characters, commonly referred to as letter spacing, differs from kerning because it applies a fixed amount of spacing regardless of the shape of each character.
The following example compares text before and after applying kerning with the font-kerning property.
(This example uses a font that provides kerning information.)
font-kerning: none disables the use of kerning information
Before kerning is applied, the space between V and A appears wider, and V looks slightly shifted to the right compared to A.
font-kerning: normal enables the use of kerning information
Applying kerning intentionally adjusts the spacing between V and A so the two letters fit together naturally and look more balanced.
The font-kerning Property
The CSS font-kerning property specifies whether to use the kerning information stored in a font.
The font-kerning property has no effect on fonts that do not provide kerning information.
The syntax for the font-kerning property is as follows.
Formal Syntax
selector {
font-kerning: /* value */
}
Formal Definition
| Initial value | auto |
|---|---|
| Applies to | all elements |
| Inherited | yes |
| Animatable | no |
Values
auto |
Determined by the browser.
In most cases, the kerning information stored in the font is used. However, some browsers disable kerning for small text because applying kerning may impair readability. |
|---|---|
normal |
Applies the kerning information stored in the font.
This has no effect on fonts without kerning information. |
none |
Disables the use of kerning information stored in the font. |
Syntax
/* Keyword values */
font-kerning: auto;
font-kerning: normal;
font-kerning: none;
/* Global values */
font-kerning: inherit;
font-kerning: initial;
font-kerning: revert;
font-kerning: revert-layer;
font-kerning: unset;
Usage Notes
For Latin characters, spacing between letters can often appear uneven depending on the font, so the font-kerning property is commonly used to apply kerning. However, kerning is often not applied to scripts where this issue is less common, particularly Japanese and Korean scripts.
The initial value of the font-kerning property is auto. Therefore, in most cases, kerning is automatically applied when kerning information is available in the font file, and it is not necessary to explicitly set the font-kerning value to normal.
Difference Between the font-kerning and letter-spacing Properties
The letter-spacing property specifies the spacing between characters in text (commonly referred to as "tracking"). It uses a fixed value regardless of character shape and applies the same spacing between all characters.
The font-kerning property requires kerning information to be available in the font. It smoothly adjusts the spacing between characters based on the kerning information stored in the font file. Unlike letter-spacing, it does not apply uniform spacing to all characters, but instead adjusts the spacing between specific character pairs defined by the kerning information.
Example
p {
font-size: 90px;
font-weight: 900;
}
.no-kern {
font-kerning: none;
color: red;
}
.with-kern {
font-kerning: normal;
color: blue;
}
<p class="no-kern">WAVE</p>
<p class="with-kern">WAVE</p>
WAVE
WAVE
Browser Compatibility
| Property |
Desktop Chrome
|
Desktop Edge
|
Desktop Firefox
|
Safari
|
|---|---|---|---|---|
font-kerning
|
33 | 79 | 32 | 9 |
Specifications
| Specification | |
|---|---|
font-kerning
|
CSS Fonts Module Level 4 #font-kerning-prop |