Modified how line label offsets are calculated.