Linux – Why does transparency disable subpixel rendering in Adobe Reader

adobe-acrobatadobe-readerlinuxpdftransparency

I normally prefer Adobe Reader (still v9 on Linux) to all other PDF viewers because I think it has the best rendering quality, even though others have caught up lately. This rendering quality appears to be to a large part due to CoolType, Adobe's implementation of subpixel rendering. Unfortunately I've found that Adobe Reader consistently switches subpixel rendering off (on a per-page basis) as soon as the page contains transparent elements. An example:

Blue shape is opaque, text is rendered using subpixels:

opaque

Blue shape is 50% transparent, text is rendered with standard antialiasing:

transparent

The two corresponding pdf files have been generated in exactly the same way (using TikZ/PGF with pdflatex), except for specifying transparency in the second case. I made these pdfs myself, but I have frequently observed the same effect with pdfs from completely different sources. Strangely, Foxit Reader and Okular render the same two pdfs in an exactly identical way (except of course for the transparent part itself), but at a generally worse quality IMHO.

My question: Does someone know why this happens, and whether / how it can be avoided?

Best Answer

Subpixel rendering is done by using the individual colors of a pixel. Every pixel on a screen is made up by an even smaller pixel with the color of red, green and blue.

If you want to render an object that is 10.3 pixels wide, you would use only the red color of the 11th pixel. The screen would then emit light from 31 subpixels, that is 10 full pixels and then a third of a pixel.

If you try to simulate this effect yourself, simply by drawing 10 white pixels wide, and then a red pixel on the right at a black background, you would see the effect yourself.

The problem is that you would notice that the right edge would be red, this if you simply do it that way. Most likely, Adobe has to use advanced algorithms to cancel out that effect - possibly by amplifying the value of the red and green of the 10th pixel.

Adding transparency to an algorithm that is already quite advanced is probably something they haven't solved yet and therefore, they simply disable subpixel rendering.

I believe this to be the case, because I've tried to implement subpixel rendering myself in this naive way and I saw that "coloured side" effect myself.

Related Question