The descent-override CSS descriptor for the @font-face at-rule defines the descent metric for the font. The descent metric is the height below the baseline that CSS uses to lay out line boxes in an inline formatting context.
Syntax
descent-override: normal;
descent-override: 90%;
Values
normal- : The default value. When used the metric value is obtained from the font file.
<percentage>- : A <percentage> value.
Formal definition
Formal syntax
Examples
Overriding metrics of a fallback font
The descent-override property can help when overriding the metrics of a fallback font to better match those of a primary web font.
@font-face {
font-family: "web-font";
src: url("https://example.com/font.woff");
}
@font-face {
font-family: "local-font";
src: local("Local Font");
descent-override: 125%;
}
Specifications
Browser compatibility
See also
- @font-face/ascent-override
- @font-face/font-display
- @font-face/font-family
- @font-face/font-weight
- @font-face/font-style
- @font-face/font-stretch
- font-feature-settings
- @font-face/font-variation-settings
- @font-face/line-gap-override
- @font-face/src
- @font-face/size-adjust
- @font-face/unicode-range descriptor
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
