Better text rendering in Chromium-based browsers on Windows
64 comments
·February 13, 2025calebh
BearOso
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.
mananaysiempre
Once upon a time I owned a LCD monitor with diagonal subpixels[1], and subpixel antialiasing absolutely didn’t work on that either. It’s just that it was very niche and I’m not sure if there were even any follow-up products that used the same arrangement.
[1] Samsung SyncMaster 173P (released 2004, bought IIRC 2006)
Tadpole9181
LG used WRGB striping.
Also, this isn't true? The blur busters founder (Mark Rejhon) has worked a lot on this exact issue and already has defined shaders and approaches to arbitrary subpixel geometry text shaders in the PowerToys repos (no thanks to Microsoft).
His approach is based on the Freestyle HarmonyLCD subpixel rendering approach which has supported non-striped layouts for over 6 years.
We're currently blocked by Microsoft, who continue to ignore everyone on this issue despite Mark's best efforts. Core Windows shaders need to be modified and he can't really proceed without cooperation, without injecting a security risk for anyone who uses his solution.
nolok
> At the present moment OLED screens are the superior display technology
Until the lighting condition move away from "99% perfect" and then it falls way below QLED.
kevin_thibedeau
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.
wtallis
> 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 display). Zero of those 4k monitors are smaller than 27", so none of them are getting close to 200 PPI.
On the low-PPI side of things, there are 255 models with a resolution of 2560x1440 and a diagonal size of at least 27". One standard size and resolution combination that was common over a decade ago still outnumbers the entirety of the high-PPI market segment.
If you look at the Steam Hardware Survey results, their statistics indicate an even worse situation, with over half of gaming users still stuck at 1920x1080.
If subpixel antialiasing made sense during the first decade after LCDs replaced CRT, then it still matters today.
vlovich123
> If you look at the Steam Hardware Survey results, their statistics indicate an even worse situation, with over half of gaming users still stuck at 1920x1080.
Are these the natural resolution of the monitor or just what people play games at? I suspect the latter because the most popular gards are more mid level / entry level cards. The 1650 is still at #4.
kevingadd
The linked issue points out that grayscale AA has color fringing on some of the subpixel layouts. It's not obvious to me how one would fix it though, it seems like a deficiency built-in to panels with weird subpixel layouts and the subpixel layouts are a compromise chosen to achieve (fake?) higher PPI
mrpippy
My overriding feeling after reading this is: displaying text is a key job of a web browser. A browser that showed no text would be useless. And yet, after learning that Chromium's text looked wrong on Windows (by far the most important platform for Edge and Chrome), it took 4 years for the Chromium and/or Edge teams to fix it.
4 years of user research?
3 years to respect the user's ClearType Tuner values?
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.
wtallis
To an unfortunately large degree, browsers and browser engines are simply not concerned with respecting the host platform's defaults and conventions. The browsers are here to replace (and reinvent) the host platforms, not integrate with them. Developers writing apps to run in a browser engine are more likely to care about their app looking the same across all devices and operating systems, even if their users may care more about the app following the same conventions as other apps on their platform of choice.
Edge getting this wrong is embarrassing for Microsoft, but is not at all surprising when you take into account how notoriously fractious Microsoft is and how unlikely it is that anyone in Microsoft could enforce a cohesive vision for UI standards to the extent of being able to make this a release blocker for Edge.
jgneff
That's actually pretty fast. It took 10 years for Java[1] and 5 years for JavaFX[2] to fix some trivial but rather severe text rendering bugs. Most of that time was getting enough courage to fix them myself. :-)
Reporting text rendering bugs is frustratingly difficult!
feverzsj
Chrome's font rendering issue on Windows has been known for more than a decade. Turns out all you need to do is reading proper gamma/contrast values from register.
But they didn't fix it in Skia, so most Skia based projects still have shitty font rendering on Windows.
Here is the meta issue tracker:
martinsnow
If i understand correctly, chrome is using windows own font rendering capabilities which should be the preferred method?
ygra
Only for shaping and measuring, if I recall correctly. Rendering is still done by Skia and not DirectWrite.
vlovich123
I feel like the before/after picture is a prank. I can’t tell a difference, at least looking at it on my iPad.
eviks
Visible on a phone, though the why is not clearly seen because that's not how you compare such poor quality pics - you need to flip back & forth, preferably zoomed (a common fail of most of these kind of blogs is not to do that). Then you can see the deficiencies on the left and the reason why it's so thin - in letters like 'i' the vertical bar is semi-transparent, not solid
tiffanyh
If you look at the non-highlighted black text, in the new version - the text is darker. I agree it's minor, but it's definitely darker.
https://developer.chrome.com/static/blog/better-text-renderi...
Note: I'm not affiliated to Chromium in any way.
megaman821
Embedding that image in a blog where it has to be resized down is silly since it makes the change impossible to see. At full size I can easily see the difference between the two though.
rbanffy
Resampling the image made the comparison essentially impossible. The 1:1 version makes it perfectly clear.
paulirish
https://imgsli.com/MzQ4OTEw A before/after image slider. Sadly, not pixel perfect, but a small upgrade for comparison UX.
rvnx
Looked better before I guess
do_not_redeem
To me the one on the right looks slightly darker/bolder, but not qualitatively better. The stems on the letter "m" in "<meta" in lines 2 and 4 are badly hinted (smeared/mushy looking), and drawn differently even though they're in the same horizontal position in both lines.
rvnx
Yeah the new version looks bolder or more blurry, slightly more tiring to read
cbg0
Right side looks slightly better on a 1440p 27" oled, text has better contrast.
seanalltogether
The text is just higher contrast, if you pull out a color dropper tool or zoom way in on the text you can see the after image has darker text
ahartmetz
The text looks fatter / darker on the right
jcelerier
wild, it's obvious to me even in miniature and even more at 1x size, and I don't even have my glasses on
dbcooper
Perhaps they can fix the extreme slope angle of italics on some sites next.
rhodescolossus
That's really great news. I always wondered why text rendering in Chrome looked so much worse than Firefox.
rbanffy
Is it my impression or text rendering on Windows is just worse than on other platforms?
exusn
It's worse. Windows aggressively alters the shape and overall character of fonts to perform anti-aliasing, making them appear sharper on low-DPI displays.
Linux is a goofy with this too, but still looks better than Windows. macOS handles it best on high-DPI displays, but because subpixel anti-aliasing is no longer used, fonts can be a little blurry on low-DPI displays.
kevingadd
It's partly a matter of taste, I know people who prefer it. But historically Apple has paid the most attention to high-quality text rendering and Windows' approach has been... utilitarian, with stuff like ClearType mostly optimized for 'crispness' and detail at the expense of actually looking good consistently, IMO.
Oarch
Funny, yesterday I noticed this and thought "huh, it's like the text got a bit sharper" and then immediately dismissed it as something I must have made up...
rafram
I had noticed this in Chrome, and it always irked me! I definitely can see the difference.
zokier
One of those things that to me is frustrating is how there is no clear unambiguous definition of what is correct in font rendering. Presumably typeface designers have some specific intent on how heavy strokes and stems are, but then that somehow becomes ambiguous when a font gets rendered on screen.
Asking for user feedback feels kinda pointless in that context, does your average user know what some random font should look like? Better would be to ask type designers for feedback on rendering their own typefaces
crazygringo
There is actually a definition of what is correct, and I'm pretty sure Adobe Photoshop does it in one of its modes.
It's just pure grayscale antialiasing of the underlying letterform, with the correct gamma used by the monitor. Or subpixel rendering if you want, as long as it matches your screen's actual LCD layout.
The issue is that that's not necessarily what's most readable. So various forms of hinting and darkening can be introduced to improve readability, and all of that is of course entirely subjective.
xnx
Pretty cool story of mainline Chrome benefiting from changes implemented in Edge.
egnehots
What about all the designers that used to handle this issue by tweaking their font weights, colors...? Changing a long standing issue with a lot of users will break things for some people (using edge, with an eyes for these details..)
hnra
Are these defaults part of Skia or Chromium, i.e. will all Skia dependents benefit from this change?
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 have tried twisting Microsoft's arm to fix this issue. At the present moment OLED screens are the superior display technology, but cannot be used for productivity because of this issue.
[1]: https://github.com/microsoft/PowerToys/issues/25595