remove unreachable code in text geometry