Fix line labels for wide characters

Ref: issue #1453

This is a patch on `js/svg/label.js` to solve the issue of Chinese labels, modifying the calculation of `textWidth()` taking into account wide characters.  Tested locally and the labels displayed correctly.