move text measuring into separate module

This commit is contained in:
nightwing 2014-02-15 12:30:30 +04:00
commit f352165725
4 changed files with 183 additions and 127 deletions

View file

@ -2393,14 +2393,17 @@ var EditSession = function(text, mode) {
return screenRows;
};
// For every keystroke this gets called once per char in the whole doc!!
// Wouldn't hurt to make it a bit faster for c >= 0x1100
/**
* @private
*
*/
this.$setFontMetrics = function(fm) {
// todo
}
// For every keystroke this gets called once per char in the whole doc!!
// Wouldn't hurt to make it a bit faster for c >= 0x1100
function isFullWidth(c) {
if (c < 0x1100)
return false;