FontFace: descentOverride 屬性

可用性有限

此特性不是基線特性,因為它在一些最廣泛使用的瀏覽器中不起作用。

注意:此功能在 Web Workers 中可用。

descentOverride 屬性是 FontFace 介面的一個屬性,用於返回和設定 descent-override 描述符的值。可能的值包括 normal(表示使用的度量標準應從字型檔案中獲取)或一個百分比值。

字串。

示例

js
let fontFace = new FontFace(
  "Roboto",
  'url("https://fonts.example.com/roboto.woff2")',
  { descentOverride: "90%" },
);
console.log(fontFace.descentOverride); // 90%
fontFace.descentOverride = "normal";
console.log(fontFace.descentOverride); // 'normal'

規範

規範
CSS 字型載入模組等級 3
# dom-fontfacedescriptors-descentoverride

瀏覽器相容性