Re: [csswg-drafts] [css-fonts] Specifying changes to parameters for fallback fonts (#126)

The CSS Working Group just discussed `Specifying changes to parameters for fallback fonts`, and agreed to the following:

* `RESOLVED: Solve the general case of fallback font adjustment via @font-face descriptors`
* `RESOLVED: Add advance-override descriptor to Fonts 5, precise details TBD`

<details><summary>The full IRC log of that discussion</summary>
&lt;gregwhitworth> Topic: Specifying changes to parameters for fallback fonts<br>
&lt;chrishtr> q+<br>
&lt;astearns> github: https://github.com/w3c/csswg-drafts/issues/126<br>
&lt;gregwhitworth> chris: the general principal is wanting to change things based on which font was actually used<br>
&lt;gregwhitworth> chris: so you set them conditionally, they expect a simple syntax. Much of this thread is to say that most simple solutions are not going to work<br>
&lt;astearns> ack chrishtr<br>
&lt;gregwhitworth> chrishtr: I wanted to point out a few things<br>
&lt;gregwhitworth> chrishtr: which syntax would be used<br>
&lt;gregwhitworth> chrishtr: main usecase that xiaochengh had in mind was automatically overriding when you have a fallback of a webfont you want to limit jumping of the webpage and add little to not difficulty to the author because it behaves automatically<br>
&lt;leaverou> q+<br>
&lt;gregwhitworth> chrishtr: the one alternative is to have a CSS property that has augmented syntax and I think that would end up being quite complex because it would need to repeat<br>
&lt;astearns> ack leaverou<br>
&lt;gregwhitworth> leaverou: there have been many proposals, they seem to revolve around changing the font-props<br>
&lt;gregwhitworth> leaverou: the syntax would get quite complicated<br>
&lt;gregwhitworth> leaverou: rather than change props let's add inline conditionals based on prior resolutions of inline conditionals<br>
&lt;gregwhitworth> leaverou: you can then branch however you want and it only gets as complicated as the author needs it to be<br>
&lt;gregwhitworth> leaverou: so you can end up with multiple font-families in a single element<br>
&lt;drott> q+<br>
&lt;gregwhitworth> leaverou: you don't want a different letter-spacing for every glyph for example<br>
&lt;gregwhitworth> leaverou: this gets future improvements for conditional syntax<br>
&lt;gregwhitworth> myles: one of the args against my proposal was unreadable and I think this may be more unreadable<br>
&lt;astearns> ack drott<br>
&lt;gregwhitworth> astearns: that would depend on the general usage but yes more flexibility usually adds complexity to parse<br>
&lt;gregwhitworth> drott: would you add a way to selector for the inline font?<br>
&lt;gregwhitworth> leaverou: no a keyword, such as accentColor<br>
&lt;gregwhitworth> leaverou: I can drop a link to the proposal<br>
&lt;leaverou> https://github.com/w3c/csswg-drafts/issues/126#issuecomment-775990597<br>
&lt;leaverou> s/accentColor/currentColor/<br>
&lt;xiaochengh> q+<br>
&lt;drott> q+<br>
&lt;gregwhitworth> astearns: I'm thinking this is a good thing to get too, but this more immediate need a descriptor rather than waiting for a solution to the conditional styling<br>
&lt;astearns> q?<br>
&lt;gregwhitworth> myles: in the last issue we were going to add one of these degrees of freedom to the descriptor<br>
&lt;gregwhitworth> myles: as a more concrete proposal should we try to add 4 additional descriptors to ensure alignement?<br>
&lt;chris> q?<br>
&lt;astearns> ack xiaochengh<br>
&lt;gregwhitworth> xiaochengh: the proposed syntax of this property is complicated and the implementation will be complicated too<br>
&lt;drott> q-<br>
&lt;astearns> ack fantasai<br>
&lt;gregwhitworth> xiaochengh: I'm not sure how to implement that in Chrome to be honest<br>
&lt;gregwhitworth> fantasai: I think going with the descriptor is a much better way than trying to embed this in font properties especially so many CSS calculations depend on those properties<br>
&lt;gregwhitworth> fantasai: properties are really weird to bind font-face to some value<br>
&lt;myles> q+<br>
&lt;gregwhitworth> fantasai: we can't just put it into the font-face rule, you'd want different styles to different elements, we're going to have derivitives of the same font-face with different overrides<br>
&lt;gregwhitworth> fantasai: it would be good to cascade in so you don't have to repeat them<br>
&lt;gregwhitworth> myles: so inheritance for at rules?<br>
&lt;leaverou> q+<br>
&lt;gregwhitworth> fantasai: cascading rules which is what counter style does<br>
&lt;gregwhitworth> fantasai: I support jonathan's proposal overall<br>
&lt;astearns> ack myles<br>
&lt;fantasai> jfkthame's proposal https://github.com/w3c/csswg-drafts/issues/126#issuecomment-764641927<br>
&lt;gregwhitworth> myles: one of the degrees of freedom is font-weight and that is a matching property<br>
&lt;gregwhitworth> myles: so if we want to have an override I'm not sure how that would work<br>
&lt;florian> q+<br>
&lt;cbiesinger> q+<br>
&lt;cbiesinger> hm<br>
&lt;cbiesinger> qq+<br>
&lt;gregwhitworth> myles: what that should mean is that that element shouldn't select the defined font-weight<br>
&lt;drott> q+<br>
&lt;gregwhitworth> chris: that shouldn't impact matching<br>
&lt;astearns> ack cbiesinger<br>
&lt;Zakim> cbiesinger, you wanted to react to myles<br>
&lt;chris> q?<br>
&lt;gregwhitworth> christian: could you solve that issue by having a font adjustment factor, so if the fallback is used you can multiply by something like 0.9<br>
&lt;cbiesinger> q-<br>
&lt;gregwhitworth> myles: so if you fallback to font-x use a factor of .8 or .9 for font-y<br>
&lt;gregwhitworth> myles: I think that's what chris was saying<br>
&lt;gregwhitworth> fantasai: would that work with variable fonts?<br>
&lt;gregwhitworth> myles: no it wouldn't work for var fonts<br>
&lt;gregwhitworth> fantasai: jonathan's solution has a mapping table<br>
&lt;gregwhitworth> florian: font-weight is the odd one here<br>
&lt;astearns> ack florian<br>
&lt;gregwhitworth> florian: they're not really numbers they're a way to match a font that happens to map to numbers<br>
&lt;astearns> zakim, close queue<br>
&lt;Zakim> ok, astearns, the speaker queue is closed<br>
&lt;myles> q+<br>
&lt;gregwhitworth> florian: if we're dealing with variable fonts we need to map to ranges or series<br>
&lt;gregwhitworth> florian: the others are actual measurements, this one is weird<br>
&lt;gregwhitworth> leaverou: I want to say we're discuss two orthogonal issues and one is trying to provide a better fallback and one trying to improve styling for ones that were selected for fallback<br>
&lt;drott> q-<br>
&lt;gregwhitworth> leaverou: there are usecases that are local fonts eg: Mac vs Windows fonts<br>
&lt;gregwhitworth> myles: the folks we've talked with are fine with font-face being used<br>
&lt;astearns> zakim, open queue<br>
&lt;Zakim> ok, astearns, the speaker queue is open<br>
&lt;TabAtkins> ScribeNick: TabAtkins<br>
&lt;TabAtkins> myles: There are these props we're interested in<br>
&lt;TabAtkins> myles: weight, size, letter-spacing, word-spacing, line-height<br>
&lt;TabAtkins> myles: line-height might be taken care of by ascent/descent-override<br>
&lt;TabAtkins> myles: letter-sacping resolved in last issue<br>
&lt;TabAtkins> myles: font-weight sounds hard, need more time<br>
&lt;TabAtkins> myles: but font-size and word-spacing, maybe we could make progress<br>
&lt;TabAtkins> jfkthame: font-stretch?<br>
&lt;TabAtkins> myles: could be. would you like it to be?<br>
&lt;TabAtkins> chris: yeah, condensedness should be in the list<br>
&lt;florian> q+<br>
&lt;TabAtkins> astearns: Wondering if we should have a general reoslution to solve these things as @font-face descriptors, and start getting spec text for this<br>
&lt;leaverou> q-<br>
&lt;chrishtr> Agreed on font-face resolution being a good next step.<br>
&lt;chrishtr> And then discuss types of overrides.<br>
&lt;TabAtkins> astearns: For previous issue, for the simpler things here, and then ahve separate issues for each type of override<br>
&lt;TabAtkins> astearns: This is alread a giant issue that tends to spin out into overlapping convos<br>
&lt;chris> Yeah that sounds like a plan<br>
&lt;astearns> q?<br>
&lt;TabAtkins> florian: A discussion over the break: instead of specifying the amount you want to adjust the font, specify the target amount<br>
&lt;TabAtkins> florian: UA could adjust automatically, but could be flexible with variable fonts, etc<br>
&lt;TabAtkins> florian: Or choose different fallbacks with better metrics<br>
&lt;fantasai> TabAtkins: That might work for some things, but I can't see how it would work for advance<br>
&lt;TabAtkins> myles: It'd be an overall tracking value, like "make the average character width X sized"<br>
&lt;TabAtkins> jfkthame: Too many questions there, how to average?<br>
&lt;TabAtkins> florian: Not harder than just using the adjustment<br>
&lt;fantasai> TabAtkins: Disagree<br>
&lt;fantasai> TabAtkins: Current proposal only adjust the fallbacks.<br>
&lt;fantasai> TabAtkins: Take the good font, then load fallback and tweak it until to works<br>
&lt;fantasai> s/works/works the way you want<br>
&lt;TabAtkins> myles: This is why I opened an issue for font-size-adjust:auto<br>
&lt;TabAtkins> myles: Right now author needs to guess<br>
&lt;fantasai> TabAtkins: At least you can guess and check for font-size easily, but see your point in general<br>
&lt;TabAtkins> myles: So suggested we have an auto for that<br>
&lt;astearns> ack fantasai<br>
&lt;astearns> ack florian<br>
&lt;TabAtkins> fantasai: There was discussion about reoslution<br>
&lt;TabAtkins> fantasai: proposed resolution is to address these use-case with descriptors<br>
&lt;TabAtkins> fantasai: Don't think we can be more specific atm<br>
&lt;TabAtkins> fantasai: I know Chrome wants to address the advance-override case sooner rather than later, so we should make progress on making that concrete<br>
&lt;TabAtkins> astearns: So resolve the general descriptor, and specifically add advance-override<br>
&lt;TabAtkins> fantasai: in Fonts 5?<br>
&lt;TabAtkins> myles: yeah<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> jfkthame: Not quite sure we know what advance-override means yet - details tbd?<br>
&lt;TabAtkins> astearns: Yes, we resolve to add it, can spin out issues to nail down details.<br>
&lt;TabAtkins> RESOLVED: Solve the general case of fallback font adjustment via @font-face descriptors<br>
&lt;TabAtkins> RESOLVED: Add advance-override descriptor to Fonts 5, precise details TBD<br>
</details>


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


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

Received on Tuesday, 9 February 2021 16:25:33 UTC