FontFace: ascentOverride プロパティ

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

ascentOverrideFontFace インターフェイスのプロパティで、フォントの ascent メトリック、つまり CSS がインライン整形コンテキストで行ボックスをレイアウトするために使用するベースラインからの高さを返したり設定したりします。

このプロパティは @font-faceascent-override 記述子と等価です。

文字列です。使用可能な値は、使用するメトリクスをフォントファイルから取得することを示す normal か、パーセント値です。

このプロパティは ascent-override 記述子と同じ値を受け入れます。

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

仕様書

Specification
CSS Font Loading Module Level 3
# dom-fontfacedescriptors-ascentoverride

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
ascentOverride

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support