FontFace: lineGapOverride-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 your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

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

Die lineGapOverride-Eigenschaft der FontFace-Schnittstelle gibt den Wert des line-gap-override-Deskriptors zurück oder setzt ihn. Die möglichen Werte sind normal, was bedeutet, dass die zu verwendende Metrik aus der Schriftart-Datei bezogen werden sollte, oder ein Prozentsatz.

Wert

Ein String.

Beispiele

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

Spezifikationen

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

Browser-Kompatibilität