FontFace: descentOverride-Eigenschaft

Limited availability

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

We'd love to hear more about your role and the company you work for
Please help us by answering a few questions.

Hinweis: Diese Funktion ist in Web Workers verfügbar.

Die descentOverride-Eigenschaft des FontFace-Interfaces gibt den Wert des descent-override-Descriptors zurück und legt ihn fest. Mögliche Werte sind normal, was bedeutet, dass das verwendete Maß aus der Schriftartdatei stammen sollte, oder ein Prozentsatz.

Wert

Ein String.

Beispiele

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'

Spezifikationen

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

Browser-Kompatibilität