mapnik/node-mapnik — pull request #77 by yhahn (2011-12-12 16:11:41+00:00)
Title: Simplify font registration, fix splice skipping directories.

Remove `dirs.splice` which can skip a path if a path prior to it does not exist. Example:

var foo = ['a', 'b', 'c'];
for (var idx in foo) {
console.warn(foo[idx]);
if (foo[idx] === 'b') foo.splice(foo.indexOf('b'), 1);
}
> a
> b

Guessing this splice is here from the early days of `node-mapnik` and just never got removed. In my particular case it was preventing `~/.fonts` from being registered because `/usr/local/share/fonts/truetype` does not exist on my system.