Skip to content

[css-font-loading-3] Should document.fonts.add delay Window load events? #11192

@Agog-io

Description

@Agog-io

I was adviced to ask this here from here

I noticed that using something akin to the following block of code in the current implementation on chrome and firefox , before window load event firing , delays it for the duration of loading font-name.ttf

const font = new FontFace(
	"font-name",
        "url(font-name.ttf)"
);

document.fonts.add(font);

I am building a system that uses JS to load fonts and I would like to know if this is intended (current behavior actually helps my implementation).

There was a very similar discussion to this here on whatwg/html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions