Make the math consistent between the hover logic and the render logic. refs: https://github.com/wez/wezterm/issues/3113