smooth drawing algorithm. alphabet detection.