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

I think I see what's happening.

> Font makers are going to be pretty consistent in interpreting a point to = 1/72 inch.

Yes, this we can agree on.

Let's take a trip back in time, before the Web existed, when early Apple computers were being designed. Here, the OS was designed for 72dpi devices, such that one typographical point = 1 pixel on the screen. I don't think this is true for Windows (though someone can correct me if I'm wrong). This design has continued forward to today, and even into iOS, even being generalized from the concept of a pixel into the modern concept of "Cocoa point." Different devices are shipped with different physical DPIs because of physical constraints, but the design of the OS has followed this design from the beginning.

Then, the Web was invented, and CSS along with it. Using `px` as a CSS unit became common. Browsers on the Mac decided to map 1 CSS `px` to one physical pixel on the screen. This is understandable; it would have been unfortunate if every border sized be an integral number of CSS `px` ended up being fuzzy on the Mac. The browsers correctly abided by all the ratios listed in CSS, where 1 CSS `pt` = 4/3 CSS `px`. So far so good.

Now, we fast forward to today, where we are discussing optical sizing. This is a feature that is defined to be represented in typographical points - specifically _not_ physical pixels or CSS points. macOS and iOS are still designed under the design that one Cocoa point = 1 typographic point. So, if someone was trying to achieve a measurement of 1 typographical point = 1/72 inches (not CSS inches!) on macOS or iOS, the correct way to achieve that would be use a value of one Cocoa point, and the way of representing one Cocoa point in every browser on macOS & iOS is to use 1 CSS pixel.

I can't speak about any other specific OSes, but we can consider a hypothetical OS which was designed where 1 pixel = 1/96 inch = 3/4 typographical points. If someone was trying to achieve a measurement of 1 typographical point = 1/72 inches (not CSS inches!) on this hypothetical OS, the correct way to achieve that would be use a value of 4/3 pixels, and the way of representing 3/4 pixels in the browser might be to use 3/4 pixels.

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

Received on Tuesday, 22 October 2019 00:47:17 UTC