Behdad Esfahbod's daily notes on GNOME, Pango, Fedora, Persian Computing, Bob Dylan, and Dan Bern!

My Photo
Location: Toronto, Ontario, Canada

Ask Google.

Contact info
Hacker Emblem Become a Friend of GNOME I Power Blogger
follow me on Twitter
July 2003
August 2003
October 2003
November 2003
December 2003
March 2004
April 2004
May 2004
July 2004
August 2004
September 2004
November 2004
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
July 2008
August 2008
October 2008
November 2008
December 2008
January 2009
March 2009
April 2009
May 2009
June 2009
July 2009
August 2009
November 2009
December 2009
March 2010
April 2010
May 2010
June 2010
July 2010
October 2010
November 2010
April 2011
May 2011
August 2011
September 2011
October 2011
November 2011
November 2012
June 2013
January 2014
May 2015
Current Posts
McEs, A Hacker Life
Monday, April 30, 2007
 World Time Zone Mug for Business Travelers and World Tourists

I totally want one of these.

Labels: , ,

Thursday, April 26, 2007
 GNOME Cell Phone

After resisting for almost four years in Canada, I finally got myself a cell phone. I normally don't feel the need, but last time travelling to California, it was a disaster without one. Given that I'm going to be in Alberta this weekend, and Montreal (for the LGM), I thought I better pick one before regretting again.

Went for a simple pay-as-you-go plan with a simpler Nokia 3220 handset. I like that it's Nokia: they've been so nice to me. I like that it's almost convex. I don't like that it uses a different charging socket than the N800. :(

It was physically themeable, so I didn't give it a minute:

Not quite satisfied, but that's it for now. Now if it was GNOME-powered...

Labels: , , ,

 More olpc action shots

Trying to launch an activity:

Playing Block Party:

Labels: ,

Monday, April 23, 2007
 Cost of Code Refactoring

In cairo we had a little problem since the early days and I thought I may as well fix it in a Thursday afternoon this past week. Or did I?

The problem was that to test that certain features are working as expected, we need to be able to force those features on/off from the test suite. The features involved are such things as communicating with an X server without the Render extension, or forcing image fallbacks in PS/PDF/SVG backends. So the way we were doing this was having functions exported in the shared library with names like _cairo_*_test_*(). Apparently that's less than elegant.

There were two options: 1) to make them only available in "debug" builds, or 2) to move those functions out to a separate shared library used just for testing. First option was not that compelling as it forces some tests turned off in production builds, so I took the second approach. We already have this library that is a set of routines used by the test and performance suites. So it was perfect place to move those functions. The catch was: the new functions needed to somehow reach into cairo's internals. Something that cairo users should not be able to do. My solution to this was to use cairo's private header files to tweak certain values inside cairo objects. Clean enough: no global variables, no extra symbols exported in

So it was basically just moving code around: from cairo/src/ into cairo/boilerplate. But to do that I needed to move certain struct definitions from C source files to header files. While at that, I also decided that it makes a lot more sense if I break cairo-boilerplate.c into backend-specific files. Something that we had planned to do for some time anyway, for good reason. So now I had to break boilerplate into about 9 pieces, move some structs from source files to headers, move some functions from src/ into boilerplate/, and finally update tests to adapt to the new APIs.

What looks like simple enough mud work turned out to be a marathon taking well over 12 hours of intense typing. Renaming symbols to have proper prefix, typing lots of files names like cairo-boilerplate-xlib-private.h, adding those new files to, and to git, populating header files, and making sure the build doesn't break at any time is no small thing.

The result? Not less than 51 commits. Add to that the mutex cleanups I did Thursday morning too, and they will add up to 68. Enough said that I was so mental that in two commit logs, typed "[cairo-commit]" instead of "[cairo-mutex]". I would have had a lot more productive Thursday and Friday if people have had added those bits in the right places in the first place. But then again, that's why maintainers are... or are we?

It also meant that I was not doing what I was supposed to do during the first Toronto olpc meetup at the linuxcaffe. I still had great time. Thanks Mike, and I'll promise to be more useful next time.

Labels: , , , ,


Interesting research from MS Live Labs: PhotoSynth.

Labels: ,

Monday, April 16, 2007
 Persian vs Arab

Before some other evil post it here, I'll do myself :-D. So blizzard loved this.

Now since we are "Persian" and "we are very nice", hvae a look at some nice photos of our "Persia" here.


Labels: , , , , ,

Friday, April 13, 2007
 Google Summer of Code: GNOME Projects

Now that Summer of Code projects are finally out, and GNOME got 29 exciting projects, I'd like to thank all the students, mentors, selection committee, and Google for all their hard work this past weeks.

The list of GNOME projects is here

Labels: , ,

 Metrics hinting and kerning do mix

Metrics hinting is the act of round the advance width of a glyph to whole pixels. It's essential for getting good looking text redering on displays with not-so-high resolutions.

Kerning is the act of adjusting the space between certain pairs of adjacent glyphs. This, too, is essential for high quality text rendering.

Both Pango and Qt have been doing metrics hinting, and doing kerning, practically since forever. But both had this bug that the kerning adjustment were not rounded to whole pixels. So, a single fractional kerning pair could end up canceling all the metrics hinting effort... This was most evident with fonts that have more than a few kerning pairs, like DejaVu Sans. Most apparent in the string "rrrrrrrrrrrrrrrr" with that font.

The bug is no more. Fixed in Qt last week, and in Pango today. Pango commit here.


Further reading: there is a lot more to do in this area. An informative post from David Turner, and an excellent paper from Owen Taylor.

I want to implement some of that stuff in cairo/pango for next major releases, but more important is that all these details are being taken care of in the HarfBuzz unified shaper project that Pango and Qt developers are developing together. Exciting times.

Labels: , , , , ,