Redesigned function to only consider separation between the end of vertical size of one line and the beginning of next line