* this commit gets rid of the HAVE_PANGO pragma and HAVE_FREETYPE,
preferring the Pango sections of HAVE_PANGO. using Cairo methods for
fonts is discouraged (http://cairographics.org/FAQ/#using_pango),
and freetype was only ever needed for cairo font rendering, so that
code was running in the Pango build for no reason at all.
* it also gets rid of context2d's `addFont`, which was never compatible
with the Pango build. `FontFace` is completely removed since it was
never used by the Pango build either, and instead of parsing the fonts
with FreeType we will instead prefer to let the OS do that in
succeeding commits
* the Windows build has been updated to work with Pango, which it did
not before
TL;DR - Pango is now required and and as of this commit custom fonts are
removed
* Use default arguments when undefined arguments are passed.
* Throw TypeError on first invalid argument
* Accept a number 'encoderOptions' as the quality
* Fall through to image/png if an unsupported encoding is requested
* Return "data:," if the canvas has no pixels
* Lower-case the format before testing for support
Added some argument testing/manipulation to match WebKit/Moz behaviors.
Additionally benchmarked:
* branching on `if (a == 0 || a == 255)`, as it is
* not branching (always doing the alpha calculation)
* Mozilla's implementation found here: https://dxr.mozilla.org/mozilla-central/source/dom/canvas/CanvasRenderingContext2D.cpp#5083
Mozilla's is insignificantly faster (p=0.17) :) so left it as-is.
Progressive jpegs have several very useful advantages over baseline
jpegs:
* Slightly smaller for the same quality (3-7%)
* Load much faster in most browsers.
This adds the `options.progressive` option to the
canvas.jpegCreateStream() function.
When node switched it's build system to GYP then the resulting bin
will be put in "Release" instead of "build". So check for both places with a
little `bindings.js` shim.