Query regarding what sensor to use

I have decided to do a project that traces the handwriting. So i am looking for a sensor that can actually trace the path which it travels. Is there any sensor that outputs an analog waveform based on the path it travels…?

Nothing that immediately comes to mind except a vision sensor.