Live data from Hacker News

Better text rendering in Chromium-based browsers on Windows

developer.chrome.com

91–100 of 133 posts

Re: Better text rendering in Chromium-based browsers on Windows

#91
post #71
post #26

Are these defaults part of Skia or Chromium, i.e. will all Skia dependents benefit from this change?

Developer here. These changes impacted both Chromium and Skia. Skia dependents can now configure their text gamma and contrast values via SkSurfaceProps - https://skia-review.googlesource.com/c/skia/+/798096

Thanks for the info!

Re: Better text rendering in Chromium-based browsers on Windows

#92
Why does Chromium need to manually set default contrast/gamma values instead of just reading Windows' default ClearType values? The article mentions they added support for reading ClearType Tuner values last year, so why aren't the Windows defaults available through the same API? Seems unnecessarily complex to maintain separate defaults.

Re: Better text rendering in Chromium-based browsers on Windows

#93

Earlier quoted context omitted.

> The subpixel layout of OLED screens is different than the the traditional layout, so text ends up looking pretty bad. Patching ClearType would be the first step to fixing this issue. Patching ClearType is unfortunately not as straightforward as it should have been. In an ideal world, you just change the sampling kernel your rasterizer uses to match the subpixel layout (with perceptual corrections) and you’re done.…

> Unfortunately, that ( I find this fascinating, because I recall school textbooks having visible dots, but I'm yet to experience what people refer to as "oh my god I'm seeing the pixel!". It further doesn't help that when seated at a typical distance (30° hfov) from a ~23" 16:9 FHD display (96 ppi), you get a match (60 ppd) for the visual acuity you're measured for when an optometrist tells you that you have a 20/20…

As far as I know, visible dots in color printing are usually due to limitations on the set of available colors and limited precision with which the separate stages that deposit those colors on the sheet can be aligned with each other, not due to the inherent limitations on the precision of each of those color layer. You get dots in photos, but not jagged lines in your letters. And 300 dpi is what your local DTP / page layout person will grumpily demand from you as the bare minimum acceptable input for that dithering, not what the reader will ultimately see. One way or another, 96dpi pixelated (or blurry) text in e.g. an illustration in a printed manual is really noticeable, and miserable to read in large stretches.

A more precise statement is perhaps that 96dpi is much too low to use plain sampling theory on the original outlines to rasterize fonts. It does work. The results are readable. But the users will complain that the text is blurry, because while there’s enough pixels to convey the information on which letter they are looking at, there are not enough of them to make focusing on them comfortable and to reproduce the sharp edges that people are accustomed to. (IIRC the human visual system has literal edge detection machinery alongside everything else.)

And thus we have people demanding crisp text when the requisite crispness is literally beyond the (Nyquist) limit of the display system as far as reproducing arbitrary outlines. Sampling theory is still not wrong—we can’t do better than what it gives us. So instead we sacrifice the outlines and turn the font into something that is just barely enough like the original to pass surface muster. And in the process we acquire a heavy dependency on every detail of the font display pipeline, including which specific grid of samples it uses. That’s manual hinting.

Seriously, leaf through the Raster Tragedy (linked in GP) to see what the outlines look like by the time they reach the rasterizer. Or for a shorter read, check out the AGG documentation[1] to see what lengths (and what ugliness) Microsoft Word circa 2007 had to resort to to recover WYSIWYG from the lies the Windows font renderer fed it about font metrics.

As for seeing pixels—I don’t actually see pixels, but what I do start seeing on lower-res displays after working on a good high-res one for a week or so is... lines between the pixels, I guess? I start having the impression of looking at the image through a kind of gray grille. And getting acclimatized to (only!) seeing high-res displays (Apple’s original definition of Retina is a good reference) for several days really is necessary if you want to experience the difference for yourself.

[1] https://agg.sourceforge.net/antigrain.com/research/font_rast...

Re: Better text rendering in Chromium-based browsers on Windows

#94
The text rendering looks much better now!

Would the same teams at Google be interested in implementing better line breaking? The Japanese text in the screenshot in the article breaks words in half. There's a library that does it already; it just needs adding to Chromium: https://github.com/google/budoux/

Re: Better text rendering in Chromium-based browsers on Windows

#95
post #46
post #29

It would be great if we could also go ahead and fix subpixel anti-aliasing for OLED screens. People have been been trying for years to get Microsoft's attention about this issue. [1] The subpixel layout of OLED screens is different than the the traditional layout, so text ends up looking pretty bad. Patching ClearType would be the first step to fixing this issue. I'm surprised that none of the display manufacturers h…

It's not that easy. With the stripe layouts, all you have to do is increase the horizontal or vertical resolution when rasterizing, then map that to subpixels. There's no current methodology or algorithms to deal with triangular layouts, etc. And OLED's subpixel layouts have been moving around yearly with both LG and Samsung. Those two even have RGB stripe layouts forecast for the future.

> There's no current methodology or algorithms to deal with triangular layouts, etc.

I believe there are rasterization algorithms that can sample the ideal infinite-resolution picture according to any sampling kernel (i.e. shape or distribution of light) you desire. They may not be cheap, but then computer graphics is to a great extent the discipline of finding acceptable levels of cheating in situations like this. So this is definitely solvable. Incompatibility with manual hinting tuned to one specific sampling grid and rasterization algorithm is the greater problem.

Re: Better text rendering in Chromium-based browsers on Windows

#96
post #43

Earlier quoted context omitted.

They should just ditch ClearType and use grayscale AA like Acrobat used to have. PPI is high enough on modern displays that the reduction in resolution won't matter.

> PPI is high enough on modern displays that the reduction in resolution won't matter. Have you looked at the desktop monitor market recently? There are still a lot of models that are not substantially higher PPI than what was normal 20 years ago. PCPartPicker currently shows 1333 monitors in-stock across the stores it tracks. Of those, only 216 have a vertical resolution of at least 2160 pixels (the height of a 4k d…

I wonder why 2160p 24" monitors didn't catch on. I've got a Dell one that's probably 7 years old. Works well with my retina MacBook Pro.

Re: Better text rendering in Chromium-based browsers on Windows

#97

Earlier quoted context omitted.

> Unfortunately, that ( I find this fascinating, because I recall school textbooks having visible dots, but I'm yet to experience what people refer to as "oh my god I'm seeing the pixel!". It further doesn't help that when seated at a typical distance (30° hfov) from a ~23" 16:9 FHD display (96 ppi), you get a match (60 ppd) for the visual acuity you're measured for when an optometrist tells you that you have a 20/20…

As far as I know, visible dots in color printing are usually due to limitations on the set of available colors and limited precision with which the separate stages that deposit those colors on the sheet can be aligned with each other, not due to the inherent limitations on the precision of each of those color layer. You get dots in photos, but not jagged lines in your letters. And 300 dpi is what your local DTP / pag…

Thank you for these resources, I'll read through them later.

While here, wasn't the original Retina defition also 60 ppd?

Re: Better text rendering in Chromium-based browsers on Windows

#98
post #75

Earlier quoted context omitted.

> Being a regression from pre-Chromium Edge, this should have been a release blocker on Chromium-based Edge. Instead, text looked bad for 4 years. Text didn't look bad. It just didn't look identical to the rest of the OS. It's not obvious why that should be a blocker at all, rather than a low-priority inconsistency. And for people who switch between devices all day long but use the same browser, you could even argue…

Furthermore it's not just that it didn't look identical to the rest of the OS. There is in fact no culture for Windows apps to conform to the platform specific look and feel. A long time ago people were discussing inconsistent ClearType use in Microsoft's own apps like Office and Internet Explorer: it turned out that both Office and IE had their own settings for enabling or ignoring ClearType. In my opinion, that cho…

Yeah as a person who only uses Microsoft Windows when absolutely necessary, who consequently has not been conditioned to overlook its many quirks, I find it hilarious that someone would judge an app for not being consistent with the look and feel. To see how unrealistic this complaint is, all you have to do is launch the Control Panel, then launch the Device Manager, and compare them.

Re: Better text rendering in Chromium-based browsers on Windows

#99
post #43

Earlier quoted context omitted.

> PPI is high enough on modern displays that the reduction in resolution won't matter. Have you looked at the desktop monitor market recently? There are still a lot of models that are not substantially higher PPI than what was normal 20 years ago. PCPartPicker currently shows 1333 monitors in-stock across the stores it tracks. Of those, only 216 have a vertical resolution of at least 2160 pixels (the height of a 4k d…

I wonder why 2160p 24" monitors didn't catch on. I've got a Dell one that's probably 7 years old. Works well with my retina MacBook Pro.

They existed for a while, and as recently as a year or two ago there was a cheap LG 24" 4k that was only about $300. But I think the monitor market in general moved on to focus more on larger sizes, and "4k" became the new "HD" buzzword that meant most products weren't even going to try to go beyond that. So basically only Apple cared enough to go all the way to 5k for their 27" displays, and once everyone else was doing 4k 27" displays a 4k 24" display looked to the uninformed consumer like a strictly worse display.

Re: Better text rendering in Chromium-based browsers on Windows

#100
post #83

Earlier quoted context omitted.

I don't think it's a big issue on Microsoft's radar because a lot of OLED screens have a high enough pixel density that the problem isn't really noticeable. The subpixel arrangements themselves have also improved in recent years, further mitigating the issue. I have a 27" 1440p 3rd gen QD-OLED panel and while I can make out some fringing if I pay real close attention to black-on-white text, it's not noticeable in gen…

If you know that your monitor is a 3rd-generation QD-OLED panel, then you probably know that text rendering was the main complaint about earlier generations of QD-OLED, and there are probably still more of those in the wild than ones as recent as yours.

This is also a very valid point. The improvement in text clarity on this panel was one of the key reasons why I decided to pull the trigger on this $1,000 monitor, while I had passed on previous models.
Post reply on HN