Skip to content

[css-fonts-4] Browser behaviour for @font-feature-values/font-display on rel="preload" #3069

@superpoincare

Description

@superpoincare

I understand font-display in @font-feature-values is a recommended feature to control display of fonts when you have no direct control of the @font-face block such as loading from Google Fonts.

However, it doesn't seem to specify what happens if the browser doesn't see the @font-face yet.

For example, I might use rel="preload" for Google fonts and the browser might start painting the page before the css is downloaded.

Suppose I use

font-display: block;

inlined in the HTML.

Would the browser show invisible text or the fallback font?

This question arises because it may have been assumed that the css is loaded synchronously in which case painting doesn't occur until the css is downloaded and parsed in which case both font-feature-settings/font-display and the @font-face block is known to the browser and in this case fallback font isn't used.

Cannot assume this if css is preloaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions