[css-font-loading-3] Relationship between FontFace and CSSFontFaceRule

Open
#3,787 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
css
Domain
api, web-dev

Research direction

Read the CSS Font Loading Level 3 section on the FontFace/CSSFontFaceRule connection, then review the issue's questions about separate objects and future attributes. Consider the WebFonts WG's mentioned work on streamable fonts. Done means documenting or reaching a CSSWG direction on the relationship and its impact on the API.

Written by the indexing model from the issue text.

Description

css-font-loading-3

The ship has probably sailed on this, but I still think it's worth discussing in the context of future direction.

Regarding the FontFace object and the @font-face rule, the spec says this:

There is a two-way connection between the two: any change made to a @font-face descriptor is immediately reflected in the corresponding FontFace attribute, and vice versa.

So why have two separate objects? Why didn't we add a bunch of member attributes/methods on CSSFontFaceRule instead? In the future, should the CSSWG add new attributes to both objects?

This is relevant due to the work the WebFonts WG is doing on streamable fonts. That work will likely impact the CSS Font Loading API.

Dominant language
Bikeshed
Stars
4.9k
Forks
816
Avg merge
2d 18h
Merged PRs (30d)
24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from w3c/csswg-drafts

All issues in w3c/csswg-drafts

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.