Re: [csswg-drafts] [css-fonts-4] Stop claiming that 'ch' uses the first available font, since it doesn't

> It’s pretty unfortunate that ch units can cause fonts to download.

Can they?

It seems to me the definition of "first available font" is slightly unclear:

> The **_first available font_**, used for example in the definition of font-relative lengths such as 'ex' and 'ch' or in the definition of the 'line-height' property is defined to be the first available font that would match the U+0020 (space) character given font families in the 'font-family' list (or a user agent’s default font if none are available).

But this doesn't say what it means for a font to be "available". If the font-family list includes `@font-face` families for which resources have not (yet) been downloaded, are those fonts "available" for the purpose of computing font-relative lengths or not?

AFAICT, the spec usually uses "available" to refer to a font resource that has been downloaded and is ready for use, so I've assumed that was the intent here as well; but in §4.1 it seems to regard any font defined by a `@font-face` rule as being "available":

> A given set of `@font-face` rules define a set of fonts available for use within the documents that contain these rules.

without regard for whether the relevant resources have actually been fetched.

[1] https://drafts.csswg.org/css-fonts-4/#first-available-font

-- 
GitHub Notification of comment by jfkthame
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/pull/3129#issuecomment-423308956 using your GitHub account

Received on Thursday, 20 September 2018 19:44:51 UTC