It's quite long now after optimizations in https://github.com/sourcelair/xterm.js/pull/798, we should pull it into its own .ts file. Perhaps CharWidth.ts?