Wednesday, 28 August 2013


Indoi is a new Indian restaurant on Short St in Newmarket, very close to the Mozilla office. It's my favourite Indian restaurant in Newmarket. The non-vegetarian thali lunch special is $15, which is a very reasonable price for a very nice meal. I've concerned about their longevity though; I almost never see customers there other than our lunch group. It's probably partly the location; a lot of restaurants have come and gone there, Short St doesn't get much foot traffic, and the restaurants on Lumsden Green probably snap up a lot of the customers heading in that direction. My advice is to eat at Indoi before it shuts down!

Tuesday, 20 August 2013

Creating Screencasts On Linux

I had great difficulty creating a good screencast for the previous blog post. Various tools I tried all had horrible flicker problems in the captured video. I think the problem is related to the GNOME compositing window manager I'm using in Fedora 18. After various tools failed, I solved the problem using vncserver to set up a separate X11 display in which to run the demo app, and using ffmpeg to record the video like so:

ffmpeg -f x11grab -s 1024x768 -i eternity:2 capture.webm
(where 'eternity:2' is the DISPLAY for the vncserver)

Update: Ignore the above solution. Andrew Overholt pointed out that GNOME Shell has screen-casting built in: just press Ctrl-Alt-Shift-R to start and stop, and .webm files are dumped in your Videos directory. It works perfectly for me! Somehow in all my Internet searching I never discovered this feature.

SVG-In-OpenType Progress Update

TypeCon is coming up and there's going to be a discussion there about competing proposals for advanced glyph rendering, especially coloured glyphs. That was an incentive for me to knuckle down over the last couple of days and fix some issues in our implementation of the Mozilla-Adobe proposal that adds an "SVG" OpenType table to render glyphs in SVG format.

I had to update our implementation from our original prototype to use the format defined by the merged Adobe-Mozilla proposal. Then I had to track down a bug in the calculation of glyph extents for SVG glyphs --- this turned out to be a generic bug affecting any font with egregious glyph extents, so I'm glad we've caught it. The last and most interesting part of the Gecko work was to enable animation in SVG glyphs. This is tricky because we need to map from a font whose glyphs have changed back to all documents and text that using that font, so we can ensure the text is properly repainted, and we've never needed this mapping before. gfxFont.cpp is gnarly but the code worked out OK.

Creating fonts with SVG glyphs has required hacky scripts so far, and I was getting tired of that, so before I did the Gecko changes I wrote a small Web app to help: SVG OpenType Workshop. You can open an existing OTF/TTF font file (sorry, no WOFF support yet), create/edit an SVG table document, see the results on (editable) sample text live as you type (generating a new font file at every keystroke), and save the generated font. I found it very useful, and it shows that you can have live font editing in Web apps without an SVG font DOM or other dedicated browser APIs. To render the fonts, the application requires browser support for the SVG-OT draft mentioned above, so for now only experimental Firefox builds will work.

Check out this screencast of animated glyphs in action.

Thursday, 8 August 2013

Mozilla Code Reviews Talk On Air Mozilla

In Taipei in May, as a followup to the engineering culture discussion, we had a session about code reviews, covering the topic from both the point of view of the code reviewer as well as the code author. This session is now online at Air Mozilla. Similar to the engineering culture talk, this wasn't originally intended for public consumption, so is rather unpolished, but you get an honest look at what Mozilla developers talk about amongst themselves :-).

Prepare To Stop


Monday, 5 August 2013

Mozilla Engineering Culture Talk Now Online

At the Mozilla "Web Rendering" work week in Taipei in May, I led a discussion of "Mozilla (really, Gecko) engineering culture". This was partly for the benefit of all the new developers in Taiwan but I think it was interesting for many of the old hands too. The talk is now available on Air Mozilla. It's excruciating to watch myself talk, but people may find it interesting.

It wasn't initially intended for public consumption, but after reviewing it I thought "why not?". So it's a pretty honest snapshot of Mozilla developers explaining what we do.