McEs, A Hacker Life
World Time Zone Mug for Business Travelers and World Tourists
I totally want one of
these.
Labels: mug, timezone, travel
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: cellphone, gnome, painting, photos
More olpc action shots
Trying to launch an activity:
Playing Block Party:
Labels: olpc, photos
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 libcairoboilerplate.so 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 libcairo.so.
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 Makefile.am, 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: cairo, linuxcaffe, maintenance, olpc, refactoring
PhotoSynth
Interesting research from MS Live Labs:
PhotoSynth.
Labels: Microsoft, PhotoSynth
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.
'nough
Labels: comedy, Iran, Iranian, Persian, photos, video
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
hereLabels: gnome, google, soc
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.
Before/after:
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: gridfitting, harfbuzz, hinting, kerning, pango, qt