editor: use pangolayout to determine grid size.

We should probably cache this somewhere and update when the font changes.