Re: [csswg-drafts] [css-fonts] Proposal to extend CSS font-optical-sizing (#4430)

> > @tiroj And what is the likelihood that some big player will decide 'Oh, we're just going to interpret the scale as typographic points, because that's easier for us and fits with some knot that we've previously tied ourselves up in'?
> 
> @behdad The likelihood is 1.0. That's a fact.

Kindly, yes, now all browser developers have made this issue entrenched. It is now a serious problem. 

But I think we are *still* in the window of opportunity to address it, before it gets out of hand! :) 

So, please lets take this seriously – a danger that is clear and present – and not weigh speculation about what some 'other big player' might do. 

Such a player will be saying "we do not have existing usage to break, but we are willfully introducing interoperability issues with all browsers." It is a risk, not an actual and serious problem. 

> > @litherum I thought I showed in [#4430 (comment)](https://github.com/w3c/csswg-drafts/issues/4430#issuecomment-543315394) that 1 CSS `px` in all browsers on macOS = 1 point in all native apps on macOS (for some definition of “all”). It seems to me that `opsz` values fall out naturally from this.
> 
> @behdad That's a very passive way of saying "Safari screwed up". As long as there's such denial I don't think we can come up with a better proposal.

Well, hang on, Behdad :)

Miles' [comment 543315394](https://github.com/w3c/csswg-drafts/issues/4430#issuecomment-543315394) is followed by [comment 543319478](https://github.com/w3c/csswg-drafts/issues/4430#issuecomment-543319478) where he says emphatically, 

> We are absolutely applying [opsz values] correctly.

But then in [comment 543408963](https://github.com/w3c/csswg-drafts/issues/4430#issuecomment-543408963) Miles says, emphasis mine,

> From this result, it appears that the size of a typographical point is different between Windows and macOS / iOS. This is a very interesting result, and **I didn't realize it or try on Windows when implementing this.** Thanks @davelab6 for the suggestion!

That doesn't seem like 'denial' to me :) 

So then in [comment 547560995](https://github.com/w3c/csswg-drafts/issues/4430#issuecomment-547560995) Miles reaffirms that this platform  consistency is desirable:

> If Safari matched CSS points, it would be incorrect on macOS and iOS. In fact, we used to do it wrong, and I fixed it in https://bugs.webkit.org/show_bug.cgi?id=197528

@robmck-ms made this proposal, recognizing this desirability as its first poinit:

> First, we must not make any changes to the fundamental assumptions that have already been made for text sizing. Macos will still have 1 CSS px = 1 CT px = 1 macos typo pt, as it should be, and analogously in other platforms. 
> 
> Second, the implementation recommendation would be that browser set the value of opsz to 4/3 of CSS px. As I understand it, the CSS px is the fundamental, common unit, so we relate the recommendation to it and not "point" as it is too varied in definition and implementation (CSS point, macos point, windows point, UK point, European point, ...).
> 
> By doing this, print matches the web; legibility is maintained; and the CSS specification and OpenType specifications are in harmony (as opposed to dissonance we are experiencing in this thread).
> 
> Failing that, then we still need some other solution. W3C could adopt @Lorp and @twardoch's proposal, as it's a lovely compromise. But, I know I'd have to recommend everyone set font-optical-sizing to 0.75 to make fonts work, and the engineer in me cringes at the idea of having a solution in which everyone sets X to Y to work well. But perhaps there is another solution?

So, I believe the 'other solution' is simply making `font-optical-sizing` accept a ratio value, *and making the CSS Fonts module recommend a default 0.75.** 

It seems clear that since "if Safari matched CSS points, it would be incorrect on macOS and iOS" then Apple is likely to retain a default of 1.0. 

And therefore not everyone sets X to Y to work well, but only people who care about Apple's platforms. 

So, I think really the big question here is for Miles – Miles, is this correct? Would you be willing to support `font-optical-sizing` values, and if so, what default would you use?

-- 
GitHub Notification of comment by davelab6
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4430#issuecomment-632366190 using your GitHub account

Received on Thursday, 21 May 2020 21:54:39 UTC