Fallback to canvas measurement when font glyph not available
Fallback to canvas measurement when font glyph not available

If characters are inserted for which the configured font has no glyph,
the code assigns a default width of 0 to the character. This causes the
line wrapping and cursor positioning logic to be incorrect.

Instead of assigning a default width of 0, fallback to a canvas-based
measurement to determine the width the browser will use when rendering the
character.

Fixes #11.

ritzyed/ritzy,lihan/ritzy,ritzyed/ritzy,guiquanz/ritzy,yakovenkodenis/ritzy,yakovenkodenis/ritzy,guiquanz/ritzy,deepti2200/ritzy,lihan/ritzy,deepti2200/ritzy,yakovenkodenis/ritzy,guiquanz/ritzy,ritzyed/ritzy,deepti2200/ritzy,lihan/ritzy