News for hackers. Stuff that matters.
Re:Text Rendering Hates You (2019) by steerablesafe on Monday February 14, 2022 @06:32AM (#30330792)
I was assuming that to make a point. The actual subpixel order can either be retrieved by an appropriate API (if available) or be provided by the user (display settings). Point being, subpixels don't usually overlap on the same area, which is what's grayscale's assumption. I agree that if subpixel order is not known, then grayscale is a sane default.
Re:Text Rendering Hates You (2019) by user-the-name on Monday February 14, 2022 @06:50AM (#30330912)
If your stroke is 7 subpixels wide, it will be, for instance, RGBRGBR. That has three Rs, two Gs, and two Bs. That is 50% more red light than blue or green. That is tinted red, no matter how you look at it.

Subpixel antialiasing does distort colours. That is just a physical fact.

The only reason it works at all is that on average, it will even out to a uniform white. But in the details, it will not. Especially around straight vertical edges.

Re:Text Rendering Hates You (2019) by steerablesafe on Monday February 14, 2022 @06:54AM (#30330936)
That's a very naive and wrong way to do subpixel-AA. Roughly, to calculate the light intensity of a red subpixel, you must also take into account the red light intensity around a whole pixel area around that subpixel, centered on that subpixel. There are better filters to use here, this would be a box filter, which is 1-pixel wide.
Re:Text Rendering Hates You (2019) by user-the-name on Monday February 14, 2022 @06:58AM (#30330969)
No, it is not. It is the physically correct way to do it. 50% more red light is emitted than blue or green. That is a red tint. Your eyes aren't going to see that as anything other than a red-tinted line. That is what you will see. Sub-pixel antialiased text looks like it has colourful fringes. People see this. It is not in their imagination. It actually is there, and it is exactly because of sub-pixel antialiasing.
Re:Text Rendering Hates You (2019) by Firadeoclus on Monday February 14, 2022 @09:07AM (#30332123)
>No, it is not. It is the physically correct way to do it. 50% more red light is emitted than blue or green. That is a red tint.

That is a red tint. And that's why it's not the correct way to do it. A subpixel antialiased white line that is seven subpixels wide, on a black background, should not produce (8-bit RGB triplets): 0-0-0, 255-255-255, 255-255-255, 255-0-0.

Re:Text Rendering Hates You (2019) by user-the-name on Monday February 14, 2022 @09:45AM (#30332579)
Then that means you can not render full white.
Re:Text Rendering Hates You (2019) by BlueTemplar on Monday February 14, 2022 @10:29AM (#30333161)
Full brightness white is supposed to be reserved for light sources anyway, definitely not text background !
Re:Text Rendering Hates You (2019) by kaba0 on Monday February 14, 2022 @09:09AM (#30332152)
I’m not agreeing or disagreeing with any of you as I don’t have enough knowledge on the topic, but what you say would effectively mean that there is no other possible color besides RGB, which is technically true, but is a nigh useless distinction as color blending is a real phenomenon that happens to human vision. In this way, subpixel hinting, while a hack with quite a few tradeoffs, just hijacks color blending used for producing color normally on your screen for sharper fonts.
Re:Text Rendering Hates You (2019) by user-the-name on Monday February 14, 2022 @09:44AM (#30332569)
> but what you say would effectively mean that there is no other possible color besides RGB

It would not at all mean that? I don't know why you would think it means that.

All I am saying is that a if you draw a vertical line 7 subpixels wide, the light it emits will not add up to white. This is a simple physical fact.

To make it easier to imagine, think of a one subpixel wide vertical line. It will be either pure red, pure green or pure blue depending on position. In no way will that ever look white.