Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As far as I know, -webkit-font-smoothing doesn't change weight, it changes rasterization. What you describe in Photoshop also isn't weight, it's rasterization.[1]

See my post below. This is developer error from not understanding the font-weight implementation. The real answer is browser implementors use an algorithm to determine the nearest available weight. Succeeded standards, depending on how up-to-date the browser is in compliance, use slightly differing algorithms.

As a designer, you must specify exact weights, and understand what the keyword values translate to in the CSS standards. All other behavior is fallback.

[1]: https://www.thegraphicmac.com/improve-text-appearance-with-p...



Yes, it changes rasterization. It’s because MacOS has a legacy of dilating the pixel outlines when subpixel antialiasing is enabled.

When subpixel antialiasing first appeared on OS X, the FIR filter affected the gamma curve, making the font seem too light or thin. Correcting gamma the right way was expensive at the time, so they changed the rasterizer to dilate the outlines, increasing the contrast of the text.

At that same time, the *nix APIs like Xft just cranked up the coefficients of the filter so that the sum was ~40% higher than it was supposed to be, which also worked. I think that was a better method than sabotaging the outline shape.


That's fascinating, I wasn't aware of such details!


As far as I know, -webkit-font-smoothing doesn't change weight, it changes rasterization. What you describe in Photoshop also isn't weight, it's rasterization.[1]

It is true that these settings control the rasterization, but it is also true and a well-known problem that different rasterizations (and in particular, the default rasterizations on different platforms) can result in different apparent font weights.

As you noted in your longer top-level comment, this doesn't actually seem to be the problem the original author encountered here, though.


Yeah, and as DiabloD3 mentioned as well, I think it's a very good reminder.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: