Calculate line position for cues with their snapToLines flag set.

- This supports horizontal text only. It needs a few tweaks
to fully support vertical text.
Finish algorithm to position boxes when their snapToLines flag is not set.
Work.