Blog

The Misleading 1024×768

I never liked screen web user resolution statistics. I tend to believe this data is meaningless: I have a 1024x768 screen, but my browser window is current 773 pixels width. I always keep myself some space on my screen for other things and I rarely browse the web full-screen. But regardless of that, screen resolution web statistics would make you think I’d be best served with a wider web page.

So when you design your new website, please take into account that an unspecified number of people visit your site with a screen resolution wider than the browser window, like me, and that they may not like it if you force them to enlarge the window each time they visit your site.

And if you’re interested in useful statistics, you could also use a package that can track window width instead of screen resolution alone. That could be Mint with the Window Width pepper for example.


The famous Danish cartoon

I’ve not see the cartoons everyone is talking about, nor do I want to see them. Just as you can insult someone by writing funny things about him, you can do the same with a cartoon. And it is apparent that this cartoon insulted millions of people. But on the other side, can I tell you how stupid I think it is to burn embacies and to attack people because someone in their country has drawn an insulting cartoon of a religious figure?

This hole thing has grown out of proportion; in part because of those who republished it everywhere both as “news” and “free speech”, in other part by those who helped and organized violence to help “defend” Islam. These cartoons didn’t deserve all the fame they now have and making them famous just add more to the insult.

I’m tired of seeing so much people trying to polarize the world and make people to hate each other; this happen on both “sides”. People must learn to respect each other more than that.

I’ll conclude with an irony: There are those who try to divide people, and there are the ones who try to unite people. From witch group am I?


Subpixel antialiasing Achilles heel

Some people are complaining about some Mac OS X applications which do not follow their preference for subpixel anti-aliasing. Pierre Igot thinks this is due to incompetence. Michael Tsai speculates that there is a hidden issue that makes Quartz choose standard antialiasing. John Gruber just find this curious. And I know exactly why this happens and why it isn’t easy to fix.

Michael Tsai thinks this is linked to off-screen buffers which then got composited together:

The pattern I see is that applications like Pages and OmniGraffle draw multiple layers with possibly overlapping elements. A logical way to implement this is to draw the elements separately into off-screen buffers and then composite them together.

And he is exactly right. The problem is that these buffers have a transparent background on which Quartz never apply subpixel antialiasing. And that’s not because of incompetence, it is because it is simply impossible to draw subpixel antialiasing on a transparent background. The culprit is called aRGB, can you see it?

If not, here is the explanation.

Subpixel antialiasing works by giving different values to the three subpixels inside a pixel (red, green, blue) based on how far each of them are from the mathematical outline of the character’s glyph. When drawing, the compositor must apply each subpixel’s values with a different level of transparency.

The “a” in aRGB stands for alpha — it’s the transparency value for the whole pixel. That’s it, the whole pixel: when aRGB pixels are later composited with other layers, each subpixel is mixed with the same level of transparency. This is incompatible with subpixel antialiasing which requires a different transparency level for each of the three subpixels.

That said, I think Quartz is pretty smart because subpixel antialiasing works on semitransparent backgrounds, like menus pulling out from the menu bar. It implements some sort of gradual degradation of the subpixels. For instance, if the background on which it draw text has a transparency of 50%, half of each subpixel value will be standard antialiasing, the other half being subpixel antialiasing.

So if an application draws in an offscreen buffer with a transparent background — surprise! — no subpixel antialiasing. Until Apple implements some kind of aRaGaB compositor, application developers will have to choose between a fast application with off-screen rendering or subpixel antialiasing, but not both. I think the choice is easy to make for developers.

Notes

  1. A hypothetical aRaGaB compositor wouldn’t have acceleration from the graphic card anyway (graphic cards use aRGB); proper subpixel transparency may not be enough of an improvement to justify a slower and more RAM-hungry compositor.

  2. Subpixel antialiasing does not work for shadowy text either probably because Quartz internals render the text in an off-screen buffer to compute the shadow.

  3. You can test and see partial subpixel antialiasing for semitransparent backgrounds by playing with the transparency of a terminal window over another window of the same color. When the background becomes completely transparent, you’ll see standard anti-aliasing.


Naomi Klein

Can you make sense of what’s happening in Iraq? Independent World Television interviews Naomi Klein which explain why the mainstream media coverage is misleading. She relates some interesting facts, many I didn’t know myself, about the people there and their initial enthusiasm at the arrival of U.S. troops and why this enthusiasm didn’t last. Pretty interesting video.

If you’re asking what’s IWT, see this other video.



  • © 2003–2025 Michel Fortin.