Skip to content

[css-fonts-5] Allow tweaking font-weight at per-fallback granularity #5975

@litherum

Description

@litherum

This issue is split off from #126

There are 2 use cases:

  • Being able to tweak the look of fallback fonts while web fonts are loading. The goal is to reduce the effects of the visual reflow when the web font does finally load (aka "flashiness")
  • Being able to tweak the look of fallback fonts for characters which are unsupported by the primary font. (I'm sure we've all seen cases where a rogue "é" somewhere on the page is rendered in some horrific and particularly noticeable fallback.)

The goal is to allow pages the ability to say something like "for this fallback font, use font weight X, but for this other fallback font, use font weight Y."

In #126 (comment) we resolved to do this sort of thing via @font-face descriptors.

Note that, this sort of tweaking can already be done for non-variable fonts today: authors can just mark their @font-face block as having a different weight from the weight the font file reports to have. However, this doesn't work for variable fonts. So, there's more to do here, but this additional work isn't super high priority (since most of the use case is already satisfied).

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