Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-font-loading/fontface-font-variation-settings-persisted-js-api.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>Testing that variationSettings is persisted in the FontFace object</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
const face = new FontFace(
"wght",
'local("Ahem"), url("/fonts/Ahem.ttf")',
{ variationSettings: "'wght' 850" }
);
test(() => {
assert_equals(face.variationSettings, "\"wght\" 850");
}, "Test FontFace variationSettings property");
</script>
</body>
</html>