- Remove pug in favour of simple html file
- Stop sending code over the wire to eval on the server
- Remove jpeg view since it doesn't make sense to have it here
* so you can now specify ctx.font = 'custom1, arial'; etc and the later
fonts will be used for glyphs that aren't in the first ones
* i'm now calling them sys_desc and user_desc to distinguish the
description that matches the font on the system vs the description the
user passes to Canvas.registerFont
* cleaned up some style
* 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
Remove the undocumented 3rd argument of the emitters (bytes left in buffer).
Add a column to the browser tests that displays JPEGs.
Revise how buffers are allocated.
From "[WHATWG HTML Living Standard]
(https://html.spec.whatwg.org/multipage/indices.html#event-load)", the definition of 'onload':
> Fired at the Window when the document has finished loading; fired at an
element containing a resource (e.g. img, embed) when its resource has finished
loading
To adhere to that specification both handlers should be called as many times as Image loads.
From Google Chrome's Developer Tools:
```js
> function handler(evt) { console.log('img handler: %s', evt.type); }
< undefined
> var img = document.createElement('img')
< undefined
> img.onload = handler
< handler(evt)
> img.onerror = handler
< handler(evt)
> img.src = 'https://www.google.com/images/errors/logo_sm_2.png'; true
< true
< img handler: load
> img.src = 'https://www.google.com/images/errors/logo_sm_2.png'; true
< true
< img handler: load
> img.src = 'https://example.com/404.png'; true
< true
< img handler: error
> img.src = 'https://example.com/404.png'; true
< true
< img handler: error
```
hsl() and hsla() color values are now supported, with corresponding unit tests.
Also added rebeccapurple (from CSS Color Level 4) to the named color list.
Described here:
http://www.w3.org/TR/2dcontext/#dom-context-2d-setlinedash
The test images match on Chrome, but not on Firefox. It looks like
Firefox resets the lineDash to [] when given invalid parameters. My
reading of the spec agrees with Chrome.