csswg-drafts icon indicating copy to clipboard operation
csswg-drafts copied to clipboard

[css-font-loading-3] FontFace.load() doesn't switch the FontFaceSet to `loading`

Open smfr opened this issue 1 week ago • 0 comments

Reading the FontFace load() steps, they don't seem to switch the FontFaceSet to loading, despite implementations doing so. They only say what happens "When the load operation completes".

Test is:

<style id="style">
@font-face {
    font-family: "WebFont";
    src: url("../../resources/Ahem.ttf") format("truetype");
}
</style>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
description("This function makes sure document.fonts.status gets updated after style changes.");
let fonts = document.fonts;
shouldBeEqualToString("fonts.status", "loaded");
fonts.values().next().value.load();
shouldBeEqualToString("fonts.status", "loading");
document.getElementById("head").removeChild(document.getElementById("style"));
shouldBeEqualToString("fonts.status", "loaded");
</script>

smfr avatar Dec 18 '25 00:12 smfr