|
|
Log in / Subscribe / Register

Bacon: Announcing the Ubuntu Edge

Bacon: Announcing the Ubuntu Edge

Posted Jul 24, 2013 10:16 UTC (Wed) by jezuch (subscriber, #52988)
In reply to: Bacon: Announcing the Ubuntu Edge by nye
Parent article: Bacon: Announcing the Ubuntu Edge

> sub-pixel font rendering is basically my 'berserk button', that makes me immediately stressed and angry just contemplating it.

I know how you feel. It *may* make sense on very-high-dpi displays but it just looks butt-ugly on anything I use. There are some things in KDE that insist on using sub-pixel rendering (tooltips on the task bar, mostly) despite me forbidding it and I don't know how to fix it and it drives me nuts.

I wish sub-pixel rendering was never invented.


to post comments

Bacon: Announcing the Ubuntu Edge

Posted Jul 24, 2013 13:13 UTC (Wed) by alankila (guest, #47141) [Link] (8 responses)

The technology is fine, it's just generally not correctly implemented.

If you think about it, a typical display looks like this:

RGBRGBRGB, etc.

There's basically no human discernable difference between drawing a white pixel surrounded by black pixels by doing activating the above pattern with sequence 000fff000 meaning the middle RGB is activated vs. doing 008ffe000 which simply shifts the activation pattern one subpixel to the left. I lied, though. There's usually a slight black margin around each full RGB triplet, but I haven't found it to matter in practice.

Anyway, against this background subpixel rendering makes perfect sense. Where the implementations usually go wrong is that people are too lazy to care to get gamma correction and (in case of Linux) LCD bitmap filtering just right. When partially covered pixels are encountered, the OVER operator should be evaluated in linear light or coloration of the end result is likely. The LCD filtering should be simple 3-subpixel moving average so that every subpixel gets equal excitation and the result is colorless.

I hope that people start to use linear light color spaces such as scRGB(16), or sRGB texture and framebuffer support to allow linear blending to occur in linear light.

Bacon: Announcing the Ubuntu Edge

Posted Jul 24, 2013 15:41 UTC (Wed) by nye (guest, #51576) [Link] (7 responses)

>There's basically no human discernable difference between drawing a white pixel surrounded by black pixels by doing activating the above pattern with sequence 000fff000 meaning the middle RGB is activated vs. doing 008ffe000 which simply shifts the activation pattern one subpixel to the left. I lied, though. There's usually a slight black margin around each full RGB triplet, but I haven't found it to matter in practice.

True - in that example the total colour output for any rectangle of three subpixels is the same. In simplified form for 3-bit pixels:

xxx|000|000|111|000|xxx shifted to
xxx|000|001|110|000|xxx
can be viewed as if it were
xxx|x00|000|111|000|0xx
by shifting what we consider the boundary lines.

>Anyway, against this background subpixel rendering makes perfect sense.

No it doesn't. It's different to your example above because you're not just shifting the boundary line:
xxx|x00|000|111|000|0xx definitely will *not* look the same as
xxx|x00|000|110|001|0xx
Even assuming everything is correctly gamma corrected, it is fundamentally a mistake to change the balance of colours emitted within a 3-subpixel block[0], so that the overall hue in that block is objectively incorrect, in the assumption that people won't notice or care about that inaccuracy.

It *is* of course true that the eye's ability to resolve colours is far less than its ability to resolve intensity, but that does not lead to the conclusion that we can just mess with the colours willy-nilly, at least not until we've reached the point where the pixel density is so high that it is literally impossible to discern them. By that point, there's really no need for subpixel rendering anyway.

And besides, however you do it, this is a problem which is insoluble in the general case. Whatever is attempting to render *must* know *for certain* what the pixel arrangement is physically *at this moment* *per pixel*. In many cases, this is logically impossible - think about mirrored heterogeneous output devices for example.

And you can forget about ever taking a screenshot and expecting it to look good on another display if it's BGR, or Pentile, or has horizontal pixels, or...

Anyone here have 3 monitors in PLP configuration? Good luck getting sub-pixel rendering on that.

The only way it could be sanely implemented is for every rendering pipeline to supersample such that 3x3 pixels are generated for every one in the output device[1], and it is then downsampled with antialiasing applied at the final stage before display. Since that would require rendering nine times as many pixels, it's never likely to happen - and that's ignoring the question of Pentile or other exotic display schemes.

It's a hack. A dirty, nasty, ugly, cheap disgusting hack that happens to work for some people on some devices in certain situations, but which makes the situation *enormously worse* in those situations where it doesn't work, which is a lot of them.

[0] As distinct from simply 'a pixel' because of the boundary shifting which leaves the result practically the same

[1] It would need to be 3x3 rather than 3x1 because it might end up going to an output device with horizontal pixels where it would need 1x3.

Bacon: Announcing the Ubuntu Edge

Posted Jul 24, 2013 16:09 UTC (Wed) by jimparis (guest, #38647) [Link] (1 responses)

> No it doesn't. It's different to your example above because you're not just shifting the boundary line:
> xxx|x00|000|111|000|0xx definitely will *not* look the same as
> xxx|x00|000|110|001|0xx
> Even assuming everything is correctly gamma corrected, it is fundamentally a mistake to change the balance of colours emitted within a 3-subpixel block[0], so that the overall hue in that block is objectively incorrect, in the assumption that people won't notice or care about that inaccuracy.

I don't understand what you mean here, I don't think anyone proposed shifting pixels in that manner. That's what would happen if you thought a screen was RGB and it was really BGR. Certainly nobody would argue that _incorrect_ subpixel rendering is OK.

> Anyone here have 3 monitors in PLP configuration? Good luck getting sub-pixel rendering on that.

I do, and so I turn subpixel rendering off. Maybe someday software will support it, as you mention, but it's just unusable right now.

Bacon: Announcing the Ubuntu Edge

Posted Jul 25, 2013 10:21 UTC (Thu) by nye (guest, #51576) [Link]

>I don't understand what you mean here, I don't think anyone proposed shifting pixels in that manner.

Sorry, I was trying to point out that the example given by the GP wasn't describing the same situation as sub-pixel rendering, without spending ages going into details with specific examples etc. I didn't describe what I meant very well, but I don't really think it's worth going into.

Suffice it to say that I've never seen sub-pixel rendering work consistently well at normal monitor densities and distances, although some of the best examples look okay if I'm leaning back in my chair at home (where I have a large monitor and tend to sit further back).

Bacon: Announcing the Ubuntu Edge

Posted Jul 25, 2013 9:07 UTC (Thu) by alankila (guest, #47141) [Link] (4 responses)

I also realized that I wrote my example incorrectly, somehow mixing implied nybble activation energy with just 1 bit of activation mask. My example should probably have been written just 000111000 and 001110000. In any case I think you got it.

You are correct in that the subpixel image is not portable across displays, but to me it's a hugely beneficial hack and that justifies its usage. Almost every frame is rendered to a display with known properties, so there's no point to construct a hugely elaborate scheme for the odd chance that the rendering targets multiple different cases, especially as it would be prohibitively expensive.

I made a few sample renderings with approximation of gamma correction called alpha correction a few months back for horizontal RGB screens:

https://bel.fi/alankila/lcd/lwns.png (alpha correction with truetype slight hinting)
https://bel.fi/alankila/lcd/lwnu.png (alpha correction with unhinted text)
https://bel.fi/alankila/lcd/lwn.png (alpha correction with hinted text)

This is just to show that color fringing doesn't have to happen with subpixel rendering, though alpha correction being an approximation is generally only some factor of 10 better than the usual linux rendering with respect to the color error. One other observation to be made is that black gamma corrected glyphs are narrower than people are used to.

Bacon: Announcing the Ubuntu Edge

Posted Jul 25, 2013 10:24 UTC (Thu) by nye (guest, #51576) [Link] (3 responses)

>I made a few sample renderings with approximation of gamma correction called alpha correction a few months back for horizontal RGB screens

Horizontal RGB as-in horizontal pixels, or as-in horizontal arrangement of vertical pixels?

Either way I'll try to remember to take a look at it on both later.

Bacon: Announcing the Ubuntu Edge

Posted Jul 25, 2013 18:58 UTC (Thu) by alankila (guest, #47141) [Link] (2 responses)

Well... err, I'm a bit confused by your question. The image was constructed for a screen where, if you take a magnifying glass to your screen, you should see each pixel to be composed of approximately 1/3 width subpixels in RGB order.

Bacon: Announcing the Ubuntu Edge

Posted Jul 29, 2013 10:44 UTC (Mon) by nye (guest, #51576) [Link] (1 responses)

Sorry, I said 'pixels', when I meant to say 'sub-pixels' - ie. in this case a horizontal arrangement of vertical subpixels.

Anyway, of those three examples, the third is by far the least objectionable, but still I wouldn't want to be stuck reading it for any length of time.

Bacon: Announcing the Ubuntu Edge

Posted Jul 29, 2013 18:08 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

> Anyway, of those three examples, the third is by far the least objectionable, but still I wouldn't want to be stuck reading it for any length of time.

Interesting. I find lwns.png to be the easiest to read. lwnu.png is fuzzy and in lwn.png I think the letters are too thin. I do agree that none are stellar though.

Bacon: Announcing the Ubuntu Edge

Posted Jul 25, 2013 12:03 UTC (Thu) by foom (subscriber, #14868) [Link]

If you've never examined text on a Mac laptop with OSX, I'd recommend doing so before writing off subpixel AA completely. Yes, even on a normal dpi non-"retina" model.

I agree that it generally looks terrible on Linux, but if it's implemented right, and has proper display calibration, it can look great.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds