MDN self-hosted library · e01.org

FontFace: sizeAdjust property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
const fontFace = new FontFace(
  "Roboto",
  'url("https://fonts.example.com/roboto.woff2")',
  {
    sizeAdjust: "120%",
  },
);
console.log(fontFace.sizeAdjust); // "120%"

fontFace.sizeAdjust = "100%";
console.log(fontFace.sizeAdjust); // "100%"