line-gap-override

可用性有限

此特性不是基线特性,因为它在一些最广泛使用的浏览器中不起作用。

line-gap-overrideCSS @font-face at-rule 的一个描述符,它定义了字体的行间距度量。行间距度量是字体推荐的行间距或外部行距。

语法

css
line-gap-override: normal;
line-gap-override: 90%;

normal

默认值。使用此值时,度量值将从字体文件中获取。

<percentage>

一个 <percentage> 值。

正式定义

相关的 at-rule@font-face
初始值normal
百分比同指定值
计算值同指定值

正式语法

line-gap-override = 
[ normal | <percentage [0,∞]> ]{1,2}

示例

覆盖备用字体的度量

line-gap-override 属性在覆盖回退字体的度量以更好地匹配主网页字体的度量时会很有帮助。

css
@font-face {
  font-family: "web-font";
  src: url("https://example.com/font.woff");
}

@font-face {
  font-family: "local-font";
  src: local("Local Font");
  line-gap-override: 125%;
}

规范

规范
CSS 字体模块第 4 级
# font-metrics-override-desc

浏览器兼容性

另见