Correct handling of glyph resizing (TODO: optimize to not call parseInt() each time)