Re: [csswg-drafts] [css-fonts-4][css-fonts-5] Add "font-synthesis: super" (#7441)

The CSS Working Group just discussed `font-synthesis: super`, and agreed to the following:

* `RESOLVED: Add font-synthesis-position as defined in https://github.com/w3c/csswg-drafts/issues/7441#issuecomment-1444461111 except 'auto' means synthesis is required (not merely allowed)`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> Topic: font-synthesis: super<br>
&lt;fantasai> github: https://github.com/w3c/csswg-drafts/issues/7441<br>
&lt;fantasai> astearns: jfkthame, can you take this one?<br>
&lt;fantasai> jfkthame: I agree there's a problem here, but unsure whta exactly is being proposed as a way forward<br>
&lt;fantasai> jfkthame: crux seems to be that it's not possible to tell whether superscript/subscript glyphs will be synthesized or not if unavailable<br>
&lt;fantasai> jfkthame: adding 'font-synthesis-position' doesn't solve the real problem here<br>
&lt;fantasai> fantasai: can you outline the problem?<br>
&lt;fantasai> jfkthame: font-variant-position is supposed to apply superscript/subscript font features if available<br>
&lt;fantasai> jfkthame: spec suggests that a browser may synthesize reduced+shifted glyphs if the OT feature doesn't actually support the characters that are present<br>
&lt;fantasai> jfkthame: a lot of fonts only have support for a small minority of characters<br>
&lt;fantasai> jfkthame: but whether the browser will or won't do synthesis is left up to the implementation<br>
&lt;fantasai> jfkthame: which means authors can't use font-variant-position because you won't know if it has an effect or not<br>
&lt;astearns> ack dbaron<br>
&lt;fantasai> dbaron: I think maybe the idea I was thinking at the time was, if we had font-synthesis-position<br>
&lt;fantasai> dbaron: then an engine that supported synthesis would support that value of font-synthesis<br>
&lt;fantasai> dbaron: and therefore you could use @supports to detect whether synthesis was supported<br>
&lt;fantasai> dbaron: whereas engine that didn't support synthesis of super/subscripts wouldn't support that value of font-synthesis because nothing to control<br>
&lt;fantasai> dbaron: since synthesis wasn't supported in the first place<br>
&lt;fantasai> dbaron: that way you can use @supports queries to detect synthesis support for font-variant<br>
&lt;fantasai> dbaron: through the addition of a font-synthesis value that controlled it<br>
&lt;florian> q+<br>
&lt;fantasai> This makes sense to me, fwiw.<br>
&lt;fantasai> astearns: So if you're using super/subscript for semantic purposes<br>
&lt;fantasai> astearns: you could check whether font-synthesis-position is supported<br>
&lt;fantasai> astearns: and know that it's OK to use it, because there will be fallback synthesis that will preserve semantics<br>
&lt;fantasai> astearns: but if not there, you know that you need to fiddle with the glyphs yourself to make sure the semantic meaning is preserved<br>
&lt;astearns> ack florian<br>
&lt;fantasai> florian: Minor related point, for this proposal of dbaron's to be reliable<br>
&lt;fantasai> florian: we need a tweak to the text<br>
&lt;fantasai> florian: currently we say that the browser "should" synthesize, we need to take it to "must"<br>
&lt;fantasai> florian: can't allow a UA to do it *sometimes*<br>
&lt;fantasai> florian: but I support dbaron's proposal<br>
&lt;fantasai> dbaron: it doesn't help for engines that already support synthesis but don't support the new value<br>
&lt;fantasai> dbaron: e.g. Gecko already does the synthesis, can't detect it right now<br>
&lt;fantasai> dbaron: but Gecko could implement this, which would make synthesis detectable<br>
&lt;fantasai> astearns: jfkthame, thoughts?<br>
&lt;fantasai> jfkthame: I think that seems reasonable<br>
&lt;fantasai> jfkthame: I think it would be nice to see a proposed spec wording<br>
&lt;fantasai> jfkthame: to make it explicit as to what happens<br>
&lt;fantasai> jfkthame: but I don't have any problem in principle with this way forward<br>
&lt;fantasai> -> https://github.com/w3c/csswg-drafts/issues/7441#issuecomment-1444461111<br>
&lt;TabAtkins> fantasai: I don't htink the specific wording is that complex<br>
&lt;astearns> ack fantasai<br>
&lt;TabAtkins> fantasai: Chris outlined the exact text we'd add<br>
&lt;TabAtkins> fantasai: The only thing we need ot make clear is if we support this property, you *will* perform synthesis for font-variant-position when it's needed. You don't have the option to not do it.<br>
&lt;TabAtkins> fantasai: Taht's all we need to add to make this work.<br>
&lt;emilio> fantasai: we'd add another prop and another value to the shorthand, and UAs must support it<br>
&lt;emilio> ... if they implement that prop<br>
&lt;fantasai> florian: Given backlog of edits, I think we can resolve on it, and if anyone is unhappy they can say so before the edit lands<br>
&lt;fantasai> astearns: Does that work?<br>
&lt;fantasai> jfkthame: sounds fine<br>
&lt;fantasai> jfkthame: main change in Chris's comment, 'auto' value means synthesis is *allowed* and instead we'd say is *required* if glyphs are missing<br>
&lt;fantasai> astearns: so playing out the future where we have an engine that does super/subscript synthesis now<br>
&lt;fantasai> astearns: decides they don't want to do synthesis anymore, they drop the property?<br>
&lt;fantasai> florian: yes<br>
&lt;fantasai> chrishtr: so spec would require synthesis<br>
&lt;fantasai> chrishtr: so chrome would no longer be spec compliant?<br>
&lt;fantasai> fantasai: No, you're mixing up font-variant-position and font-synthesis-position<br>
&lt;fantasai> chrishtr: so new thing to solve this issue<br>
&lt;fantasai> dbaron: we define the property so that it's not mandatory to implement, but if you implement has to correspond to this other feature<br>
&lt;fantasai> florian: nothing's ever mandatory in CSS, but if you implement `font-synthesis-position`, you must implement font synthesis<br>
&lt;fantasai> chrishtr: did drott's comments get answered in the issue?<br>
&lt;fantasai> astearns: ...<br>
&lt;fantasai> chrishtr: only applies to font-variant-position?<br>
&lt;fantasai> florian: UA stylesheet uses different things to simulate superscripts and subscripts, so conceptually related but technically not<br>
&lt;fantasai> florian: you can override that in CSS, but unless you do that, not relevant<br>
&lt;fantasai> chrishtr: Second question was about feature detection<br>
&lt;fantasai> fantasai: we're enabling feature detection by adding this property<br>
&lt;fantasai> @supports (font-synthesis: position) { ... do stuff with font-variant-position here ... }<br>
&lt;fantasai> chrishtr: so if we resolve to add this, then Gecko because they do synthesis, they ship this property<br>
&lt;fantasai> chrishtr: then developers would be able to reliably condition use of font-variant-position on support for font-synthesis-position<br>
&lt;fantasai> chrishtr: so can do it reliably or not<br>
&lt;fantasai> fantasai: yes, exactly<br>
&lt;fantasai> chrishtr: OK! seems fine to me, thanks for walking me through it<br>
&lt;fantasai> astearns: proposed resolution is to accept Chris's formulation of font-synthesis-position, but make it so that 'auto' forces synthesis intead of making it allowed<br>
&lt;fantasai> chrishtr: that would resolve Florian's comment at the end of the issue?<br>
&lt;fantasai> florian: correct<br>
&lt;fantasai> astearns: you're looking to preserve meaning, so you know that the syntax will be reliable<br>
&lt;fantasai> s/syntax/feature/<br>
&lt;fantasai> astearns: OK, any objection to proposed resolution?<br>
&lt;fantasai> RESOLVED: Add font-synthesis-position as defined in https://github.com/w3c/csswg-drafts/issues/7441#issuecomment-1444461111 except 'auto' means synthesis is required (not merely allowed)<br>
&lt;fantasai> astearns: Anything else on this one?<br>
</details>


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


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

Received on Wednesday, 16 August 2023 16:27:19 UTC