Not sure if I'm arriving too late to this thread.
Anyway, I've been playing a bit using OpenCV and findContours, in order to face the 'first part' of the problem: from a given 'drawn' text, find each one of the N closed paths as lists of coordinates (The string has been drawn on a bitmap and this bitmap processed with OpenCV)
The code doesn't face the second part (conversion from paths to GCode), but it should be the easy part
See attached code.