W3C home > Mailing lists > Public > public-css-archive@w3.org > September 2017

Re: [csswg-drafts] [css-fonts-4] @font-face unicode-range and first available font

From: Florian Rivoal via GitHub <sysbot+gh@w3.org>
Date: Wed, 13 Sep 2017 00:14:16 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-329020120-1505261647-sysbot+gh@w3.org>
I am running into this as I was working on #1798. I am not sure what the implications of this resolution are.

Say you have
```css
@font-face {
  font-family: foo;
  src: url("http://example.com/foo.woff");
  unicode-range: U+0061;
}
p { font-family: foo, arial; }
```
```html
<p>a</p>
```
According to the resolution, foo isn't the first available font, right? Does it mean that:
1. foo is not used at all and the `<p>`'s `a` is displayed in Arial?
2. foo is used and the `<p>`'s `a` is displayed in foo, but foo is still no considered the "first available font", which has implications on various other things, such as the explicitly listed font relative units, as well as line-height measurements as they also talk about the first available font, and possibly other things which care about the first available font (what things?)
3. foo is used and the `<p>`'s `a` is displayed in foo, but foo is still no considered the "first available font" for the exclusive purpose of the font relative units, not for any other thing that mentions "first available font".

(1) isn't what anybody does, so I presume that's not what we meant. We probably should add a note clarifying that this is not what we meant.

Between (2) and (3), I am not sure which one we meant.

In #1798, @kojiishi is understanding is this resolution to cover more than just the font relative units, and also apply to calculations about the line height and the height of the content area of non replaced inlines, which would match the (2) interpretation.

If we meant (2), then the spec needs to be clearer about that as well. Also this would be a breaking change for all browsers other than Chrome (see #1798). Based on the minutes above, it does not seem clear that there was a general understanding this resolution would mean a change for most browsers.

If we meant (3), we need to be more explicit that it doesn't apply to other things, and we also need to define what is the first available font for the purpose of the other things. Also, if we meant (3) rather than (2), then we probably need to carve out an exception for the `lh` and `rlh` font relative units, since they are meant to reflect `line-height` calculations, that (3) excludes.


-- 
GitHub Notification of comment by frivoal
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1765#issuecomment-329020120 using your GitHub account
Received on Wednesday, 13 September 2017 00:14:10 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:26:43 UTC