Re: [csswg-drafts] [css-fonts-4][css-nesting] Nesting of @supports inside @font-face and font technology feature queries (#6520)

The CSS Working Group just discussed `fonts, continued (beginning of log missing)`, and agreed to the following:

* `RESOLVED: Modify src to allow for font-tech detection per URL`
* `RESOLVED: Same syntax available in src, will be available also in @supports, possibly with a font- prefix`
* `RESOLVED: remove "supports <font-technology>#"`
* `RESOLVED: add technology() and open bikeshedding issue`
* `RESOLVED: Add font-technology() and font-format() to @supports`

<details><summary>The full IRC log of that discussion</summary>
&lt;dbaron> topic: fonts, continued (beginning of log missing)<br>
&lt;dbaron> github: https://github.com/w3c/csswg-drafts/issues/6520<br>
&lt;lea> q?<br>
&lt;fantasai> astearns: jfkthame is suggesting to re-use format() not add new function<br>
&lt;fantasai> jfkthame: ...<br>
&lt;fantasai> chris: Because existing format function requires a font format<br>
&lt;fantasai> jfkthame: I don't see why not<br>
&lt;fantasai> jfkthame: would work just the same as not specifying format function at all<br>
&lt;fantasai> jfkthame: except now filtered by the tech keywords you just expressed<br>
&lt;lea> q+<br>
&lt;fantasai> drott: Currently state of format() is quite messy and not quite inteorp<br>
&lt;florian> q- later<br>
&lt;fantasai> drott: Some accept strings, some keywords, some both<br>
&lt;fantasai> drott: New function we have the potential of cleaning that up a bit<br>
&lt;drott> q-<br>
&lt;astearns> ack fantasai<br>
&lt;Zakim> fantasai, you wanted to ask about fallback in legacy browsers and to<br>
&lt;drott> q+<br>
&lt;fantasai> fantasai: One point about format() is it wouldn't invalidate src declaration in older browsers<br>
&lt;fantasai> fantasai: whereas a new function would<br>
&lt;fantasai> fantasai: As for jfkthame's proposal, I think it would work<br>
&lt;fantasai> fantasai: it would mean that the font-tech keywords would be in the same namespace as any format keywords, so you'd have to be careful to avoid name clashes<br>
&lt;fantasai> fantasai: but otherwise seems easily parsable<br>
&lt;drott> q-<br>
&lt;fantasai> astearns: One argument against format() is that then we can't use the same syntax in @supports, as context is lost has to be font-format()<br>
&lt;astearns> ack PeterCon<br>
&lt;fantasai> PeterCon: Might be edge case, but different tech ...<br>
&lt;fantasai> PeterCon: Variations technology is binary, font is either variable or not<br>
&lt;fantasai> PeterCon: feature capabilities are mutually exclusive<br>
&lt;TabAtkins> I think `@supports font-format()` works fine - the connection to @font-face's format() seems clear that you're qualifying it now that it's in a more generic context.<br>
&lt;fantasai> PeterCon: Font could have either AAT or Graphite, but impl only wants to use one or the other<br>
&lt;fantasai> PeterCon: If the font has both, perhaps author prefers one or other<br>
&lt;fantasai> PeterCon: So may want to specify which<br>
&lt;fantasai> PeterCon: In a fallback case, they might tolerate the second choice and not the first<br>
&lt;fantasai> PeterCon: Color tech is potentially complementary<br>
&lt;fantasai> PeterCon: Font might have both and use it for different glyphs<br>
&lt;fantasai> PeterCon: iN that case, might be happy to have both<br>
&lt;fantasai> PeterCon: An author potentially might say, I want to use this font but only use the ?? color list, not any of color-v0<br>
&lt;myles> q+<br>
&lt;fantasai> PeterCon: Idk if these are too edge case to worry about<br>
&lt;fantasai> drott: I don't think necessarily that we want to describe which part of font to use<br>
&lt;fantasai> drott: this is just syntax for ???<br>
&lt;fantasai> drott: I don't think we have tools for choosing the tech, that would be a separate thing<br>
&lt;fantasai> myles: ...<br>
&lt;drott> s/ ???/selection \/ download choice/<br>
&lt;fantasai> myles: It's not a subsetting feature<br>
&lt;chris> s/?? color/sbix color/<br>
&lt;astearns> ack lea<br>
&lt;fantasai> lea: It occurred to me that format wasn't originally for feature description, but to meta describe the URL<br>
&lt;fantasai> lea: This is a woff font, this is opentype<br>
&lt;fantasai> lea: [something about calling something woff but getting an opentype and whether it opens it or rejects]<br>
&lt;fantasai> myles: I think it's specced<br>
&lt;chris> format was added because we did not (at the time) have font MIME types<br>
&lt;fantasai> myles: If browser has already downloaded font, why should not use it?<br>
&lt;fantasai> lea: I thought it was defined to describe the resource<br>
&lt;chris> q?<br>
&lt;astearns> ack florian<br>
&lt;fantasai> lea: but maybe it was defined as feature detection?<br>
&lt;fantasai> fantasai: kinda was<br>
&lt;fantasai> florian: fantasai noted that putting both tech keyword would share namespace<br>
&lt;fantasai> florian: could have some syntax to divide, e.g. "with color-v1"<br>
&lt;fantasai> florian: Issue<br>
&lt;fantasai> florian: We say space-separated list is "and" not "or"<br>
&lt;fantasai> florian: fine, but might be two different meanings for "and"<br>
&lt;myles> [ ( woff | opentype | svg)? WITH [variations, color-sbix, opentype-features]# ]<br>
&lt;fantasai> florian: Do you support this and that?<br>
&lt;fantasai> florian: do you support both in the same file?<br>
&lt;fantasai> florian: slightly different question<br>
&lt;fantasai> florian: just to make sure this is forward proof might need to think about it<br>
&lt;astearns> q?<br>
&lt;astearns> ack myles<br>
&lt;fantasai> myles: Right now there's nothing in CSS that lets you say "use this part of the font, but not the other"<br>
&lt;fantasai> myles: I think that's good, because I don't think it's implementable<br>
&lt;fantasai> myles: I don't think we should add a feature that let's you ignore certain tables<br>
&lt;fantasai> fantasai: If we were to do so, I think it wouldn't be in src, should be its own descriptor<br>
&lt;drott> fantasai: if we would do that, it should be outside src descriptor<br>
&lt;fantasai> astearns: It sounds to me that we do have consensus to modify src descriptor to add font-tech detection somehow<br>
&lt;florian> Myles' sample syntax higher up is what I mean, except for the comas (and with an allowance for bikesheding the keyword WITH)<br>
&lt;fantasai> myles: Tab said something in IRC that made a lot of sense<br>
&lt;fantasai> myles: Could do jfkthame's idea for extending format()<br>
&lt;fantasai> myles: and have the same value syntax but different function name in @supports<br>
&lt;fantasai> fantasai: Yes, that was my proposal in the issue (using format() and font-format())<br>
&lt;florian> q?<br>
&lt;florian> q+<br>
&lt;fantasai> chris: Or we could use font-technology(), I'd prefer that<br>
&lt;fantasai> chris: but won't stand in the way<br>
&lt;lea> +1 to chris's point<br>
&lt;fantasai> chris: I think it's poor design to ???<br>
&lt;drott> s/???/throw it all in the format descriptor/<br>
&lt;fantasai> myles: I think if we're adding tech queries to @supports, should also allow format queries. So if we want distinct functions, then should have both in @supports<br>
&lt;drott> s/descriptor/function/<br>
&lt;fantasai> florian: Did anyone address fantasai's point about dropping the src descriptor if adding new function<br>
&lt;fantasai> florian: My understanding is if we extend format() will be OK, if add new function will throw out entire src declaration<br>
&lt;fantasai> myles: I'm not sure that distinction is true, thinking to how we parse src ...<br>
&lt;fantasai> myles: if you put format(keyword keyword) maybe it gets dropped entirely<br>
&lt;fantasai> florian: could put it all inside one string?<br>
&lt;fantasai> [no that's terrible]<br>
&lt;fantasai> myles: You do that by having two declarations<br>
&lt;fantasai> chris: Dropping one item in list is OK, dropping entire declaration is a bit of a problem<br>
&lt;fantasai> florian: If space-separated keywords in format(), do we drop the entire declaration or treat as unknown format?<br>
&lt;astearns> ack florian<br>
&lt;fantasai> chris: Unknown format<br>
&lt;fantasai> florian: probably should check implementations<br>
&lt;fantasai> lea: In my test seems like entire descriptor is dropped<br>
&lt;fantasai> florian: that's sad<br>
&lt;fantasai> lea: So I think we should use a new function<br>
&lt;fantasai> astearns: I think we can resolve that we add font-tech detection to src descriptor<br>
&lt;fantasai> astearns: is that the case? anyone arguing against and only wants @supports?<br>
&lt;lea> FYI to test I was using this: https://codepen.io/leaverou/pen/c02cfbe57388cca2399ee427c58e9f19 and checking what requests are sent to my localhost<br>
&lt;fantasai> RESOLVED: Modify src to allow for font-tech detection per URL<br>
&lt;fantasai> astearns: Next, can we decide on whether we're extending format() or adding new function?<br>
&lt;fantasai> lea: I just tested chrome<br>
&lt;fantasai> [fussing with the test]<br>
&lt;fantasai> florian: Another thing we can resolved, whichever form we add to add to src descriptor, we will expose that to @supports, possibly with font- prefix<br>
&lt;lea> Just tested Firefox, same<br>
&lt;fantasai> astearns: objections to that?<br>
&lt;fantasai> RESOLVED: Same syntax available in src, will be available also in @supports, possibly with a font- prefix<br>
&lt;drott> slight preference for font-technology<br>
&lt;fantasai> florian: ...<br>
&lt;lea> slight preference for font-tech as well<br>
&lt;fantasai> chris: Spec doesn't say, but fine to add that<br>
&lt;fantasai> astearns: I have a slight preference for a separate function, mainly because it makes the microsyntax we're adding slightly more clear<br>
&lt;fantasai> astearns: font-tech is not a format, and having two separate names for what you're specifying is very slightly better<br>
&lt;fantasai> myles: I'd like to hear from jfkthame<br>
&lt;florian> s/.../if we were to go for two functions, would both format and the new function be allowed in @support/<br>
&lt;drott> also solves migrating away from messy state of what format() is<br>
&lt;fantasai> jfkthame: I don't have a strong view one way or other, particularly if we don't get a forward-compat benefit from using format()<br>
&lt;drott> q+<br>
&lt;fantasai> jfkthame: To my mind these are very similar feature support queries, whether feature of a particular format or feature of a particular technology with the font<br>
&lt;astearns> ack drott<br>
&lt;fantasai> jfkthame: if people wnat to separate them, it's OK with me<br>
&lt;fantasai> drott: Do we remove the current ???<br>
&lt;fantasai> lea: yes<br>
&lt;fantasai> chris: Yes, that should all go<br>
&lt;fantasai> astearns: So we will add a font-technology() function with some amount of the keywords we've discussed<br>
&lt;fantasai> RESOLVED: remove "supports &lt;font-technology>#"<br>
&lt;fantasai> florian: if we add format() to @supports, we have to add a font- prefix<br>
&lt;fantasai> florian: so shouldn't it be removed from font-technology() within src?<br>
&lt;fantasai> chris: Yes, let's be consistent<br>
&lt;fantasai> +1<br>
&lt;jfkthame> +1<br>
&lt;fantasai> lea: I thought one of the benefits was to be the same<br>
&lt;fantasai> astearns: but consistency is probably preferale<br>
&lt;fantasai> astearns: Any objections to technology()?<br>
&lt;florian> tech? capability?<br>
&lt;fantasai> fantasai: No, but I would prefer a shorter name if we can find one<br>
&lt;fantasai> lea: yes, please<br>
&lt;fantasai> RESOLVED: add technology() and open bikeshedding issue<br>
&lt;lea> given that Chrome needs to ship this soon, if we don't bikeshed soon, it's just de facto font-technology<br>
&lt;fantasai> RESOLVED: Add font-technology() and font-format() to @supports<br>
&lt;fantasai> with same syntax within the parentheses<br>
&lt;fantasai> drott: do we need both?<br>
&lt;florian> q+<br>
&lt;fantasai> astearns: prefer to add now, if ppl have objections can remove in the future, but seemed there were some use cases<br>
&lt;fantasai> florian: Point about "and" having two meanings, is it a concern?<br>
&lt;astearns> ack florian<br>
&lt;lea> what if we just add format-* keywords to font-technology()?<br>
&lt;fantasai> fantasai: You're "and"-ing over a single font file...<br>
&lt;fantasai> myles: The question is what if browser supports two different technologies, but not in the same font<br>
&lt;fantasai> florian: I guess you just choke on trying the use the download, which is wasteful but maybe not an issue<br>
&lt;fantasai> PeterCon: The example you gave was variable font with SVG table<br>
&lt;fantasai> PeterCon: likelihood of creating such a font is not great<br>
&lt;fantasai> myles: there's no way to describe variableness in SVG<br>
&lt;fantasai> Meeting closed.<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6520#issuecomment-947810568 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 20 October 2021 16:00:32 UTC