Text this: Principles of optical circuit engineering