Archive for June, 2007

Selenium Code Released

Wednesday, June 20th, 2007

The Selenium code I talked about in an earlier post has been released to PLaneT

Font Rendering Fun

Tuesday, June 19th, 2007

I’ve always wondered why fonts looked different on OS X and Windows and thanks to this blog post I now know why. The summary is that Windows favours aligning the fonts with the pixel grid, which leads to clearer type but thinner blockier text. Follow the link to see examples of the difference.

More interesting are the various font rendering techniques in use. Microsoft’s ClearType takes advantage of the known arrangement of pixels in LCD monitors which effectively triples horizontal resolution at the expensive of distorting colour. FontFocus takes a different approach to get a better result. It again focuses on aligning fonts with the pixel grid. Here’s an explanation from the white paper linked above:

Previous grid-fitting techniques … improve contrast by aligning stems to pixel boundaries, but in doing so distort individual letterforms. FontFocus leaves the shapes of the glyphs completely unchanged. Instead, it shifts each character left or right by a tiny subpixel amount, and also subtly expands or condenses individual glyphs to align all stems, if there are more than one. …

While the idea of subtly shifting and stretching glyphs to enhance contrast is simple, the core of the of FontFocus technology is how it chooses these tweaks. Most existing font rendering techniques work with a single glyph at a time. FontFocus optimizes the entire word at a time. The results are similar to what you’d get from trying each combination of subpixel offset and width stretch for each glyph in the word, and picking the combination with the best overall score. FontFocus uses an intelligent divide-and-conquer algorithm to avoid the combinatorial explosion of this brute-force method.

This immediately suggests a further improvement: try to align a whole line of text optimally. Of course the search space gets much larger so a better search method is needed. If anyone is looking for a PhD this could be fun.

What The World Eats

Friday, June 8th, 2007

What the World Eats is a moderately fascinating photo essay of the weekly food consumption of 16 families around the world. The choices and differences aren’t that unexpected, but it is interesting none-the-less. Here are some thoughts:

  • Those starving Africans really are. Of course I knew that intellectually, but didn’t feel it till I saw what they ate.
  • The Bhutan family’s food looks tasty. All those chillies and ginger. Yum. Mexico and Cairo also look good.
  • I’m surprised the Sicilians have such anaemic looking tomatoes. Perhaps the photo was taken in winter.
  • The backgrounds are fascinating. Almost the best thing in the pictures. Favourites are Bhutan, Mongolia, and Ecuador. What’s with the Western families that look like they haven’t redecorated since the 1970s? I can just feel the desert looking at the Kuwait house.

For comparison the two of us spend around £40 on food a week.

Of Interest 05/06/2007

Tuesday, June 5th, 2007

Just some quick links. It has been a busy day.