I have a vague memory that there was even a commercial option for that--a device that fit over the typewriter keyboard, that you could buy, and it would drive the typewriter from the computer.
I had for a while a NEC Spinwriter--loud, slow, built like the proverbial tank. My recollection--it's been more than 30 years since I used it--was that it did support proportional spacing.