Text this: Design of nonblocking high-density photonic switches