Backported several patches from upstream. The test suite patch for Fontconfig is no longer necessary.